diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -337,10 +337,7 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key, | |||
337 | lua_assert(isempty(slot)); /* slot must be empty */ | 337 | lua_assert(isempty(slot)); /* slot must be empty */ |
338 | tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */ | 338 | tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */ |
339 | if (tm == NULL) { /* no metamethod? */ | 339 | if (tm == NULL) { /* no metamethod? */ |
340 | if (isabstkey(slot)) /* no previous entry? */ | 340 | luaH_finishset(L, h, key, slot, val); /* set new value */ |
341 | slot = luaH_newkey(L, h, key); /* create one */ | ||
342 | /* no metamethod and (now) there is an entry with given key */ | ||
343 | setobj2t(L, cast(TValue *, slot), val); /* set its new value */ | ||
344 | invalidateTMcache(h); | 341 | invalidateTMcache(h); |
345 | luaC_barrierback(L, obj2gco(h), val); | 342 | luaC_barrierback(L, obj2gco(h), val); |
346 | return; | 343 | return; |