lua-users home
lua-l archive

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


> so whenever I used to call lua_getglobals(lua) in 4.0 I should now 
> just substitute lua_getglobals(lua,LUA_GLOBALSINDEX)?

No. LUA_GLOBALSINDEX is a pseudo-index where the global environment
lives. For an "automatic" replace you can use

  lua_pushvalue(lua, LUA_GLOBALSINDEX)

But, more often than not, you do not need to push it on the stack to use
it.

-- Roberto