diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-09-24 18:12:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-09-24 18:12:01 -0300 |
commit | 87912786af9125d062babe2497fc4cb664728eda (patch) | |
tree | 07cc2752b09679dfa8c61775cd54d01ea452e69d /ltable.c | |
parent | 5645a84368f2a515281da60f96e09d0fdeaf0470 (diff) | |
download | lua-87912786af9125d062babe2497fc4cb664728eda.tar.gz lua-87912786af9125d062babe2497fc4cb664728eda.tar.bz2 lua-87912786af9125d062babe2497fc4cb664728eda.zip |
dead objects are not collectable.
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.62 2011/08/17 20:26:47 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.63 2011/09/15 17:09:02 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 | */ |
@@ -152,7 +152,7 @@ static int findindex (lua_State *L, Table *t, StkId key) { | |||
152 | /* key may be dead already, but it is ok to use it in `next' */ | 152 | /* key may be dead already, but it is ok to use it in `next' */ |
153 | if (luaV_rawequalobj(gkey(n), key) || | 153 | if (luaV_rawequalobj(gkey(n), key) || |
154 | (ttisdeadkey(gkey(n)) && iscollectable(key) && | 154 | (ttisdeadkey(gkey(n)) && iscollectable(key) && |
155 | gcvalue(gkey(n)) == gcvalue(key))) { | 155 | deadvalue(gkey(n)) == gcvalue(key))) { |
156 | i = cast_int(n - gnode(t, 0)); /* key index in hash table */ | 156 | i = cast_int(n - gnode(t, 0)); /* key index in hash table */ |
157 | /* hash elements are numbered after array ones */ | 157 | /* hash elements are numbered after array ones */ |
158 | return i + t->sizearray; | 158 | return i + t->sizearray; |