Small cleaning services

This commit is contained in:
Roberto I
2025-08-20 13:59:08 -03:00
parent 53dc5a3bba
commit dd095677e3
3 changed files with 46 additions and 30 deletions

View File

@@ -196,8 +196,7 @@ void luaF_unlinkupval (UpVal *uv) {
*/
void luaF_closeupval (lua_State *L, StkId level) {
UpVal *uv;
StkId upl; /* stack index pointed by 'uv' */
while ((uv = L->openupval) != NULL && (upl = uplevel(uv)) >= level) {
while ((uv = L->openupval) != NULL && uplevel(uv) >= level) {
TValue *slot = &uv->u.value; /* new position for value */
lua_assert(uplevel(uv) < L->top.p);
luaF_unlinkupval(uv); /* remove upvalue from 'openupval' list */