diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-25 10:30:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-25 10:30:11 -0200 |
commit | 1b45e967b4dcb234551c2a731147b111584f4145 (patch) | |
tree | 4a257873ccadd2779df799eb8f41f146407a4081 /lbuiltin.c | |
parent | 933bead92e48cdd8f2c9b5953854270e98d58c9a (diff) | |
download | lua-1b45e967b4dcb234551c2a731147b111584f4145.tar.gz lua-1b45e967b4dcb234551c2a731147b111584f4145.tar.bz2 lua-1b45e967b4dcb234551c2a731147b111584f4145.zip |
table entries with ref=null always have val=null too.
Diffstat (limited to 'lbuiltin.c')
-rw-r--r-- | lbuiltin.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbuiltin.c,v 1.45 1999/01/04 17:34:49 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.46 1999/01/22 18:46:11 roberto Exp roberto $ |
3 | ** Built-in functions | 3 | ** Built-in functions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -348,7 +348,7 @@ static void luaB_foreach (void) { | |||
348 | luaD_checkstack(3); /* for f, ref, and val */ | 348 | luaD_checkstack(3); /* for f, ref, and val */ |
349 | for (i=0; i<a->nhash; i++) { | 349 | for (i=0; i<a->nhash; i++) { |
350 | Node *nd = &(a->node[i]); | 350 | Node *nd = &(a->node[i]); |
351 | if (ttype(ref(nd)) != LUA_T_NIL && ttype(val(nd)) != LUA_T_NIL) { | 351 | if (ttype(val(nd)) != LUA_T_NIL) { |
352 | *(L->stack.top++) = *f; | 352 | *(L->stack.top++) = *f; |
353 | *(L->stack.top++) = *ref(nd); | 353 | *(L->stack.top++) = *ref(nd); |
354 | *(L->stack.top++) = *val(nd); | 354 | *(L->stack.top++) = *val(nd); |