aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-03-01 14:49:04 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-03-01 14:49:04 -0300
commitda18ec5d5470c7248296509b8d478b4d4e3f20aa (patch)
treeac37deb1dfcc74f0d6a2f57aaed3b53baf926d14
parent038848eccdf8c829664a3c0c3a158db10d78559d (diff)
downloadlua-da18ec5d5470c7248296509b8d478b4d4e3f20aa.tar.gz
lua-da18ec5d5470c7248296509b8d478b4d4e3f20aa.tar.bz2
lua-da18ec5d5470c7248296509b8d478b4d4e3f20aa.zip
warnings...
-rw-r--r--lapi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lapi.c b/lapi.c
index e6685ee9..aea8462d 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.38 1999/02/23 14:57:28 roberto Exp roberto $ 2** $Id: lapi.c,v 1.39 1999/02/25 19:13:56 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -461,16 +461,16 @@ char *lua_nextvar (char *varname) {
461 461
462 462
463int luaA_next (Hash *t, int i) { 463int luaA_next (Hash *t, int i) {
464 Node *n;
465 int tsize = nhash(t); 464 int tsize = nhash(t);
466 while (i < tsize && ttype(val(n=node(t, i))) == LUA_T_NIL) i++; 465 for (; i<tsize; i++) {
467 if (i >= tsize) 466 Node *n = node(t, i);
468 return 0; 467 if (ttype(val(n)) != LUA_T_NIL) {
469 else { 468 luaA_pushobject(ref(n));
470 luaA_pushobject(ref(n)); 469 luaA_pushobject(val(n));
471 luaA_pushobject(val(n)); 470 return i+1; /* index to be used next time */
472 return i+1; 471 }
473 } 472 }
473 return 0; /* no more elements */
474} 474}
475 475
476 476