[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Get the function value
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 4 Sep 2001 13:54:23 -0300 (EST)
> lua_settop(L, 2); /* as before, zap extra args if any */
There's no need for this in common usage.
lua_settop is only needed to remove unwanted *return* values from functions
called inside loops.
lua_settop is also used to set absent argumens to nil.
>PD: I actually recommend not putting stuff like that in globals, since it
>is relative to a lua_State. Using globals means that whatever you write
>will only work in a single lua_State, which may prove limiting later on.
So, use the registry, which was created exactly for this.