aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-05 15:32:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-05 15:32:28 -0300
commit1ffdd0bc7a8daf288fd09a91ea26d29a5046199f (patch)
treeba0e20bbf1a71912ce2bc1ab636ffacce05918ff /ltable.c
parent528665089402ea1fff2c36efb4c95c416f01c962 (diff)
downloadlua-1ffdd0bc7a8daf288fd09a91ea26d29a5046199f.tar.gz
lua-1ffdd0bc7a8daf288fd09a91ea26d29a5046199f.tar.bz2
lua-1ffdd0bc7a8daf288fd09a91ea26d29a5046199f.zip
detail (should use macro 'ttisdeadkey')
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltable.c b/ltable.c
index 4458b58b..4fbd4ded 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.52 2010/06/25 12:18:10 roberto Exp roberto $ 2** $Id: ltable.c,v 2.53 2010/11/11 15:38:43 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -149,7 +149,7 @@ static int findindex (lua_State *L, Table *t, StkId key) {
149 do { /* check whether `key' is somewhere in the chain */ 149 do { /* check whether `key' is somewhere in the chain */
150 /* key may be dead already, but it is ok to use it in `next' */ 150 /* key may be dead already, but it is ok to use it in `next' */
151 if (luaO_rawequalObj(gkey(n), key) || 151 if (luaO_rawequalObj(gkey(n), key) ||
152 (ttype(gkey(n)) == LUA_TDEADKEY && iscollectable(key) && 152 (ttisdeadkey(gkey(n)) && iscollectable(key) &&
153 gcvalue(gkey(n)) == gcvalue(key))) { 153 gcvalue(gkey(n)) == gcvalue(key))) {
154 i = cast_int(n - gnode(t, 0)); /* key index in hash table */ 154 i = cast_int(n - gnode(t, 0)); /* key index in hash table */
155 /* hash elements are numbered after array ones */ 155 /* hash elements are numbered after array ones */