New type 'TStatus' for thread status/error codes

This commit is contained in:
Roberto Ierusalimschy
2025-01-30 11:41:39 -03:00
parent f7439112a5
commit d1e677c52b
10 changed files with 56 additions and 46 deletions

View File

@@ -44,7 +44,7 @@
/* special status to close upvalues preserving the top of the stack */
#define CLOSEKTOP (-1)
#define CLOSEKTOP (LUA_ERRERR + 1)
LUAI_FUNC Proto *luaF_newproto (lua_State *L);
@@ -54,7 +54,7 @@ LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl);
LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
LUAI_FUNC void luaF_newtbcupval (lua_State *L, StkId level);
LUAI_FUNC void luaF_closeupval (lua_State *L, StkId level);
LUAI_FUNC StkId luaF_close (lua_State *L, StkId level, int status, int yy);
LUAI_FUNC StkId luaF_close (lua_State *L, StkId level, TStatus status, int yy);
LUAI_FUNC void luaF_unlinkupval (UpVal *uv);
LUAI_FUNC lu_mem luaF_protosize (Proto *p);
LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);