[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Accessing the Globals table in Lua5
- From: "paul_winwood" <paul_winwood@...>
- Date: Wed, 09 Apr 2003 07:55:06 -0000
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.