lua-users home
lua-l archive

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


> Is it also true that a reference to the globals 
> table can be pushed on the top of the stack by using lua_pushvalue(L, 
> LUA_GLOBALSINDEX)? 

Absolutely.

> If so is this worth mentioning in the 
> documentation?

It says: 

    "The initial environment is called the global environment.
     This table is always at pseudo-index LUA_GLOBALSINDEX."

This means it can be used in any table-related call as the stack index.

Bye,
Wim