diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.355 2018/05/22 12:02:36 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.356 2018/05/30 14:25:52 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -227,9 +227,9 @@ void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val, | |||
227 | /* | 227 | /* |
228 | ** Finish a table assignment 't[key] = val'. | 228 | ** Finish a table assignment 't[key] = val'. |
229 | ** If 'slot' is NULL, 't' is not a table. Otherwise, 'slot' points | 229 | ** If 'slot' is NULL, 't' is not a table. Otherwise, 'slot' points |
230 | ** to the entry 't[key]', or to 'luaH_emptyobject' if there is no such | 230 | ** to the entry 't[key]', or to a value with an absent key if there |
231 | ** entry. (The value at 'slot' must be empty, otherwise 'luaV_fastget' | 231 | ** is no such entry. (The value at 'slot' must be empty, otherwise |
232 | ** would have done the job.) | 232 | ** 'luaV_fastget' would have done the job.) |
233 | */ | 233 | */ |
234 | void luaV_finishset (lua_State *L, const TValue *t, TValue *key, | 234 | void luaV_finishset (lua_State *L, const TValue *t, TValue *key, |
235 | TValue *val, const TValue *slot) { | 235 | TValue *val, const TValue *slot) { |
@@ -241,7 +241,7 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key, | |||
241 | lua_assert(isempty(slot)); /* slot must be empty */ | 241 | lua_assert(isempty(slot)); /* slot must be empty */ |
242 | tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */ | 242 | tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */ |
243 | if (tm == NULL) { /* no metamethod? */ | 243 | if (tm == NULL) { /* no metamethod? */ |
244 | if (slot == luaH_emptyobject) /* no previous entry? */ | 244 | if (isabstkey(slot)) /* no previous entry? */ |
245 | slot = luaH_newkey(L, h, key); /* create one */ | 245 | slot = luaH_newkey(L, h, key); /* create one */ |
246 | /* no metamethod and (now) there is an entry with given key */ | 246 | /* no metamethod and (now) there is an entry with given key */ |
247 | setobj2t(L, cast(TValue *, slot), val); /* set its new value */ | 247 | setobj2t(L, cast(TValue *, slot), val); /* set its new value */ |