lua-users home
lua-l archive

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


the code below does not seem to be generated by tolua.
aren't you using another wrapper?

-- celes

At 12:57 26/11/2002 +0200, you wrote:

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.