[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua state as a C++ class ...
- From: Daniel Silverstone <dsilvers@...>
- Date: Thu, 13 Jun 2002 10:57:30 +0100
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 http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org KeyId: 20687895
Your love life will be... interesting.