diff options
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.113 2015/07/04 16:32:34 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.114 2015/11/03 15:47:30 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 | */ |
@@ -133,6 +133,7 @@ static Node *mainposition (const Table *t, const TValue *key) { | |||
133 | case LUA_TLCF: | 133 | case LUA_TLCF: |
134 | return hashpointer(t, fvalue(key)); | 134 | return hashpointer(t, fvalue(key)); |
135 | default: | 135 | default: |
136 | lua_assert(!ttisdeadkey(key)); | ||
136 | return hashpointer(t, gcvalue(key)); | 137 | return hashpointer(t, gcvalue(key)); |
137 | } | 138 | } |
138 | } | 139 | } |
@@ -457,7 +458,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { | |||
457 | Node *f = getfreepos(t); /* get a free place */ | 458 | Node *f = getfreepos(t); /* get a free place */ |
458 | if (f == NULL) { /* cannot find a free place? */ | 459 | if (f == NULL) { /* cannot find a free place? */ |
459 | rehash(L, t, key); /* grow table */ | 460 | rehash(L, t, key); /* grow table */ |
460 | /* whatever called 'newkey' takes care of TM cache and GC barrier */ | 461 | /* whatever called 'newkey' takes care of TM cache */ |
461 | return luaH_set(L, t, key); /* insert key into grown table */ | 462 | return luaH_set(L, t, key); /* insert key into grown table */ |
462 | } | 463 | } |
463 | lua_assert(!isdummy(f)); | 464 | lua_assert(!isdummy(f)); |