lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Jun 13, 2002 at 10:37:07AM +0100, Nick Trout wrote:
> Could you not just derive your state from Luas state struct and downcast?
> Have I missed the point?

Unless I'm completely wrong (as is my wont today for some reason) -- the
lua_State which things outside of the VM know exists, is what is known as an
"opaque type" in that we know a lua_State is a struct, and we always deal in
pointers to it.

Without the actual layout, it's unlikely that you could inherit from it.
Also I'm not completely convinced that C++ allows you to inherit a class
from a struct, although I could be wrong there too.


Daniel Silverstone                     
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from               KeyId: 20687895
Your love life will be... interesting.