new macro 'setnilvalue2s'

This commit is contained in:
Roberto I
2026-04-23 18:00:23 -03:00
parent 4c5d5063a5
commit ae23e72601
9 changed files with 24 additions and 23 deletions

2
lvm.c
View File

@@ -303,7 +303,7 @@ lu_byte luaV_finishget (lua_State *L, const TValue *t, TValue *key,
else { /* 't' is a table */
tm = fasttm(L, hvalue(t)->metatable, TM_INDEX); /* table's metamethod */
if (tm == NULL) { /* no metamethod? */
setnilvalue(s2v(val)); /* result is nil */
setnilvalue2s(val); /* result is nil */
return LUA_VNIL;
}
/* else will try the metamethod */