lua-users home
lua-l archive

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

I would suggest to store your values into the Lua registry.
This fits your needs if there are only one instance of your variables per lua_State, and if you do not need to access them directly from Lua.
The table is accessed easily by the LUA_REGISTRYINDEX pseudo index.
You can either use a sufficiently specific string for the key, or a static pointer pushed as a lightuserdata,

Patrick Rapin