[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: request that lua_newtable return value of lua_gettop
- From: Peter Shook <pshook@...>
- Date: Tue, 23 Apr 2002 14:36:17 -0400
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, it would be nice if lua_newtable
would return the stack index of the table that it just created.
lua_newtable(L); names = lua_gettop(L); /* do away with call to
lua_gettop */
lua_pushstring(L, "bill");
lua_pushnumber(L, 44);
lua_settable(L, names);
- Peter