[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: why does tolua clear the stack?
- From: Asko Kauppi <Asko.Kauppi@...>
- Date: Tue, 26 Nov 2002 12:57:20 +0200
Tolua-generated code seems to call 'lua_settop(0)' in between reading the
arguments and pushing the return values. Why is this? Could someone knowing
the Lua internals comment on whether this is good, bad, or does not matter?
Examples in Lua manual (5.0) don't do such a thing.
Thanks.
- asko
>static int
>wrap_SDL_JoystickName(lua_State *L)
>{
> char * _result;
> int _arg0;
>
>{_arg0 = ( int )luaL_check_long(L, 1);}
> lua_settop(L, 0);
> _result = (char *)SDL_JoystickName(_arg0);
>{LS_luaL_pushstringpointer(L, _result);}
> return 1;
>}
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.