lua-users home
lua-l archive

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


In the documentation it says that there is a special stack index 
LUA_GLOBALSINDEX that allows the globals table to be accessed with 
lua_gettable and lua_settable. The documentation also says that the 
globals table can be replaced by a call to lua_replace(L, 
LUA_GLOBALSINDEX). Is it also true that a reference to the globals 
table can be pushed on the top of the stack by using lua_pushvalue(L, 
LUA_GLOBALSINDEX)? If so is this worth mentioning in the 
documentation? If not I can not currently find a way of enumerating 
the globals table.