[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.0 changes question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 06 Mar 2003 15:23:49 -0300
> 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