diff --git a/hash.c b/hash.c index 58598c7c..07b427bc 100644 --- a/hash.c +++ b/hash.c @@ -3,7 +3,7 @@ ** hash manager for lua */ -char *rcs_hash="$Id: hash.c,v 2.29 1996/02/14 18:25:04 roberto Exp roberto $"; +char *rcs_hash="$Id: hash.c,v 2.30 1996/05/06 14:30:27 roberto Exp roberto $"; #include "mem.h" @@ -283,17 +283,11 @@ Object *lua_hashdefine (Hash *t, Object *ref) static void hashnext (Hash *t, int i) { if (i >= nhash(t)) - { - lua_pushnil(); lua_pushnil(); return; - } while (tag(ref(node(t,i))) == LUA_T_NIL || tag(val(node(t,i))) == LUA_T_NIL) { if (++i >= nhash(t)) - { - lua_pushnil(); lua_pushnil(); return; - } } luaI_pushobject(ref(node(t,i))); luaI_pushobject(val(node(t,i))); diff --git a/inout.c b/inout.c index 9850974e..1d618596 100644 --- a/inout.c +++ b/inout.c @@ -5,7 +5,7 @@ ** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 2.36 1996/03/19 22:28:37 roberto Exp roberto $"; +char *rcs_inout="$Id: inout.c,v 2.37 1996/05/28 21:07:32 roberto Exp $"; #include @@ -113,8 +113,6 @@ void lua_internaldostring (void) lua_Object obj = lua_getparam (1); if (lua_isstring(obj) && !lua_dostring(lua_getstring(obj))) lua_pushnumber(1); - else - lua_pushnil(); } /* @@ -131,8 +129,6 @@ void lua_internaldofile (void) /* else fname = NULL */ if (!lua_dofile(fname)) lua_pushnumber(1); - else - lua_pushnil(); } @@ -218,8 +214,6 @@ void lua_obj2number (void) lua_Object o = lua_getparam(1); if (lua_isnumber(o)) lua_pushnumber(lua_getnumber(o)); - else - lua_pushnil(); } diff --git a/table.c b/table.c index 1597b0cc..a6f8ded8 100644 --- a/table.c +++ b/table.c @@ -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));