[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.0 changes question
- From: Ignacio Castaño <castanyo@...>
- Date: Thu, 6 Mar 2003 21:01:56 +0100
Hi,
If you want to get a value from the global table you do:
lua_gettable(lua, LUA_GLOBALSINDEX);
as if it were a noraml table the the given index.
If you want to get the table itself:
lua_pushvalue(lua, LUA_GLOBALSINDEX);
and that pushes the global table on the stack.
Once you have the global table on the stack you can also do:
lua_gettable(lua, -1);
to obtain a value from that table, but that has no benefit over the first
option.
It seems that you want to do something else. Maybe you want to obtain a
reference to the table?
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