warnings...

This commit is contained in:
Roberto Ierusalimschy
1999-03-01 14:49:04 -03:00
parent 038848eccd
commit da18ec5d54

18
lapi.c
View File

@@ -1,5 +1,5 @@
/* /*
** $Id: lapi.c,v 1.38 1999/02/23 14:57:28 roberto Exp roberto $ ** $Id: lapi.c,v 1.39 1999/02/25 19:13:56 roberto Exp roberto $
** Lua API ** Lua API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -461,16 +461,16 @@ char *lua_nextvar (char *varname) {
int luaA_next (Hash *t, int i) { int luaA_next (Hash *t, int i) {
Node *n;
int tsize = nhash(t); int tsize = nhash(t);
while (i < tsize && ttype(val(n=node(t, i))) == LUA_T_NIL) i++; for (; i<tsize; i++) {
if (i >= tsize) Node *n = node(t, i);
return 0; if (ttype(val(n)) != LUA_T_NIL) {
else { luaA_pushobject(ref(n));
luaA_pushobject(ref(n)); luaA_pushobject(val(n));
luaA_pushobject(val(n)); return i+1; /* index to be used next time */
return i+1; }
} }
return 0; /* no more elements */
} }