lua-users home
lua-l archive

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


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