From 15231d4fb2f6984b25e0353ff46eda1a180b686d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sun, 21 Jul 2024 14:56:59 -0300 Subject: 'nresults' moved into 'callstatus' That gives us more free bits in 'callstatus', for future use. --- lapi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 70e2a44a..a9ab1d08 100644 --- a/lapi.c +++ b/lapi.c @@ -1103,7 +1103,7 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, ci->u2.funcidx = cast_int(savestack(L, c.func)); ci->u.c.old_errfunc = L->errfunc; L->errfunc = func; - setoah(ci->callstatus, L->allowhook); /* save value of 'allowhook' */ + setoah(ci, L->allowhook); /* save value of 'allowhook' */ ci->callstatus |= CIST_YPCALL; /* function can do error recovery */ luaD_call(L, c.func, nresults); /* do the call */ ci->callstatus &= ~CIST_YPCALL; @@ -1280,11 +1280,9 @@ LUA_API int lua_next (lua_State *L, int idx) { LUA_API void lua_toclose (lua_State *L, int idx) { - int nresults; StkId o; lua_lock(L); o = index2stack(L, idx); - nresults = L->ci->nresults; api_check(L, L->tbclist.p < o, "given index below or equal a marked one"); luaF_newtbcupval(L, o); /* create new to-be-closed upvalue */ L->ci->callstatus |= CIST_CLSRET; /* mark that function has TBC slots */ -- cgit v1.2.3-55-g6feb