lua-users home
lua-l archive

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


Ignacio Castaño wrote:
> lua_gettable(L, LUA_GLOBALSINDEX);
>
> pops the key from the stack, looks up the value of the table at the given
> index, and pushes it on the stack. So, this just behaves as the 4.0
> function:
>
> lua_getglobals(L);

ops! should read the mail before sending it!

lua_pushstring(L, name)
lua_gettable(L, LUA_GLOBALSINDEX);

behaves like:

lua_getglobal(L, name);

and,

lua_pushvalue(L, LUA_GLOBALSINDEX);

behaves like:

lua_getglobals(L);

> The new lua_getglobals of 5.0 is a very different thing, and I think it
has
> been renamed to lua_getfenv or something like that. This function pushes
the
> environment table of the function. (That's a new feature of lua 5.0)



Ignacio Castaño
castanyo@yahoo.es


___________________________________________________
Yahoo! Móviles
Personaliza tu móvil con tu logo y melodía favorito 
en http://moviles.yahoo.es