[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Getting and storing global table in C
- From: "Leandro Candido" <enclle@...>
- Date: Thu, 18 Dec 2003 14:05:37 -0200
Hell All,
I'm using this code to get and store the global table from a state:
lua_pushvalue(l, LUA_GLOBALSINDEX);
lua_pushstring(l,"mynamespace_globaltable");
lua_settable(l,LUA_REGISTRYINDEX);
But, can I use another form that don't use the registry to store the
table? This is because I can't set in the global table or its children, and
I don't want to store in the registry table. Someone has a suggestion?
Another question: can I replace the global table with a userdata with
metatable? Or lua checks if global table is a real table?
The
God's Peace,
Leandro.