New functions 'lua_resetthread' and 'coroutine.kill'
New functions to reset/kill a thread/coroutine, mainly (only?) to
close any pending to-be-closed variable. ('lua_resetthread' also
allows a thread to be reused...)
This commit is contained in:
2
lvm.c
2
lvm.c
@@ -1565,7 +1565,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
|
||||
if (nparams1) /* vararg function? */
|
||||
delta = ci->u.l.nextraargs + nparams1;
|
||||
/* close upvalues from current call */
|
||||
luaF_close(L, base, -1); /* (no to-be-closed vars. here) */
|
||||
luaF_close(L, base, LUA_OK);
|
||||
updatestack(ci);
|
||||
}
|
||||
if (!ttisfunction(s2v(ra))) { /* not a function? */
|
||||
|
||||
Reference in New Issue
Block a user