A coroutine can close itself

A call to close itself will close all its to-be-closed variables and
return to the resume that (re)started the coroutine.
This commit is contained in:
Roberto Ierusalimschy
2025-06-12 11:15:09 -03:00
parent d05fe48bfd
commit fd897027f1
6 changed files with 103 additions and 21 deletions

1
ldo.h
View File

@@ -91,6 +91,7 @@ LUAI_FUNC void luaD_shrinkstack (lua_State *L);
LUAI_FUNC void luaD_inctop (lua_State *L);
LUAI_FUNC l_noret luaD_throw (lua_State *L, TStatus errcode);
LUAI_FUNC l_noret luaD_throwbaselevel (lua_State *L, TStatus errcode);
LUAI_FUNC TStatus luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
#endif