[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Private data
- From: James Hearn <james.hearn@...>
- Date: Wed, 03 Oct 2001 19:21:27 -0600
> We implemented this same thing almost exactly. It was quite useful to get
> from a lua_State * to a pointer for our C++ wrapper class. I've heard that
> Lua 4.1 has some macros to make this easier, but I have not really
> investigated.
>
> Eric
When I had to do a similar thing, I cheated and just dropped a userdata that
was the 'this' pointer of the enclosing class into a global __SYSTEM table
in the lua state. Cheap, but it worked!
--James Hearn