C functions don't need to "pushnil" to return nil value (this is

the default value).
This commit is contained in:
Roberto Ierusalimschy
1996-07-12 17:00:26 -03:00
parent 9a3c51cff1
commit 6dfdb76538
3 changed files with 4 additions and 21 deletions

View File

@@ -3,7 +3,7 @@
** Module to control static tables
*/
char *rcs_table="$Id: table.c,v 2.55 1996/05/28 21:07:32 roberto Exp roberto $";
char *rcs_table="$Id: table.c,v 2.56 1996/06/18 21:12:23 roberto Exp roberto $";
#include "mem.h"
#include "opcode.h"
@@ -240,12 +240,7 @@ static void lua_nextvar (void)
else
next = luaI_findsymbolbyname(lua_getstring(o)) + 1;
while (next < lua_ntable && s_tag(next) == LUA_T_NIL) next++;
if (next >= lua_ntable)
{
lua_pushnil();
lua_pushnil();
}
else
if (next < lua_ntable)
{
lua_pushstring(lua_table[next].varname->str);
luaI_pushobject(&s_object(next));