|
This works for getting from a userdata (on the stack) to a table.This doesn't help in getting from a C++ pointer to the table, since I can't get a userdata on the stack from a C++ pointer; or can I?
On Feb 26, 2007, at 6:29 AM, David Burgess wrote:
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 arelightuserdata (the pointer to the c structure) and whose values are theequivalent userdata object (containing the boxed pointer).db