Re: linking tables to C++ objects?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: linking tables to C++ objects?
- From: "David Burgess" <dburgess@...>
- Date: 2007年2月27日 01:29:05 +1100
Answering one of your questions:
Use LUA_ENVIRONINDEX rather than the LUA_REGISTRYINDEX,
see liolib.c for an example of its usage.
And I think this recent quote from Rici Lake applies:
The simplest way is to keep a weak-valued table whose keys are
lightuserdata (the pointer to the c structure) and whose values are the
equivalent userdata object (containing the boxed pointer).
db