diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-23 11:58:02 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-23 11:58:02 -0200 |
commit | e5743adb21c295e9903c394096c6f3737fb6dec4 (patch) | |
tree | e7eb7e12615bd9d4eba5c2b8956bc09f416cd361 /lapi.c | |
parent | 514783de9d6cd538d1a51aa8979b7763132730ac (diff) | |
download | lua-e5743adb21c295e9903c394096c6f3737fb6dec4.tar.gz lua-e5743adb21c295e9903c394096c6f3737fb6dec4.tar.bz2 lua-e5743adb21c295e9903c394096c6f3737fb6dec4.zip |
macros `key', `val', and `node' don't need the state
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.56 1999/11/11 17:02:40 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.57 1999/11/22 13:12:07 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 | */ |
@@ -420,10 +420,10 @@ const char *lua_nextvar (lua_State *L, const char *varname) { | |||
420 | int luaA_next (lua_State *L, const Hash *t, int i) { | 420 | int luaA_next (lua_State *L, const Hash *t, int i) { |
421 | int tsize = t->size; | 421 | int tsize = t->size; |
422 | for (; i<tsize; i++) { | 422 | for (; i<tsize; i++) { |
423 | Node *n = node(L, t, i); | 423 | Node *n = node(t, i); |
424 | if (ttype(val(L, n)) != LUA_T_NIL) { | 424 | if (ttype(val(n)) != LUA_T_NIL) { |
425 | luaA_pushobject(L, key(L, n)); | 425 | luaA_pushobject(L, key(n)); |
426 | luaA_pushobject(L, val(L, n)); | 426 | luaA_pushobject(L, val(n)); |
427 | return i+1; /* index to be used next time */ | 427 | return i+1; /* index to be used next time */ |
428 | } | 428 | } |
429 | } | 429 | } |