[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: request that lua_newtable return value of lua_gettop
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 23 Apr 2002 15:44:06 -0300
>Since lua_newtable currently doesn't return anything, and it is fairly
>common to call lua_gettop afterwards so that the stack index of the
>table can be passed to lua_settable
The use of negative indices is indicated here. You example would read:
lua_newtable(L);
lua_pushstring(L, "bill");
lua_pushnumber(L, 44);
lua_settable(L, -3);
--lhf