diff options
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -223,9 +223,9 @@ static void poptbclist (lua_State *L) { /* ** Close all upvalues and to-be-closed variables up to the given stack -** level. +** level. Return restored 'level'. */ -void luaF_close (lua_State *L, StkId level, int status, int yy) { +StkId luaF_close (lua_State *L, StkId level, int status, int yy) { ptrdiff_t levelrel = savestack(L, level); luaF_closeupval(L, level); /* first, close the upvalues */ while (L->tbclist >= level) { /* traverse tbc's down to that level */ @@ -234,6 +234,7 @@ void luaF_close (lua_State *L, StkId level, int status, int yy) { prepcallclosemth(L, tbc, status, yy); /* close variable */ level = restorestack(L, levelrel); } + return level; } |