lua-users home
lua-l archive

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


> "As a general rule, all API functions pop from the stack all elements they
> use."

I guess this line is not very clear. What we meant was that an API function 
pops all arguments that it receives through the stack. In your example, no 
API function gets any argument through the stack, so nothing is popped. On 
the other hand, lua_gettable receives the table and the index to be 
accessed through the stack, so it pops them. 

-- Roberto