lua-users home
lua-l archive

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


On Thu, Mar 06, 2003 at 10:53:26PM +0200, Asko Kauppi wrote:
> >I have an API call in my framework to "set the current table" so that
> >I can then iterate over its members or find a member.  Since I wasn't
> >aware of a special table name for the globals, I would simply call
> >lua_getglobals() if I wanted to select the global table.

I didn't spot this bit earlier...

lua_pushvalue(L, LUA_GLOBALSINDEX);

should (theoretically) leave the globals table on the stack (unless I've
gone utterly mad)

D.

-- 
Daniel Silverstone                               http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler          Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org               KeyId: 20687895
Beauty and harmony are as necessary to you as the very breath of life.