From d1e677c52be3b107a7a29fdc482158f6d9251e79 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 30 Jan 2025 11:41:39 -0300 Subject: New type 'TStatus' for thread status/error codes --- lstate.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 635f41d2..b47a4e9b 100644 --- a/lstate.h +++ b/lstate.h @@ -339,8 +339,8 @@ typedef struct global_State { */ struct lua_State { CommonHeader; - lu_byte status; lu_byte allowhook; + TStatus status; unsigned short nci; /* number of items in 'ci' list */ StkIdRel top; /* first free slot in the stack */ global_State *l_G; @@ -352,10 +352,10 @@ struct lua_State { GCObject *gclist; struct lua_State *twups; /* list of threads with open upvalues */ struct lua_longjmp *errorJmp; /* current error recover point */ - CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ + CallInfo base_ci; /* CallInfo for first level (C host) */ volatile lua_Hook hook; ptrdiff_t errfunc; /* current error handling function (stack index) */ - l_uint32 nCcalls; /* number of nested (non-yieldable | C) calls */ + l_uint32 nCcalls; /* number of nested non-yieldable or C calls */ int oldpc; /* last pc traced */ int basehookcount; int hookcount; @@ -438,7 +438,7 @@ LUAI_FUNC void luaE_checkcstack (lua_State *L); LUAI_FUNC void luaE_incCstack (lua_State *L); LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont); LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where); -LUAI_FUNC int luaE_resetthread (lua_State *L, int status); +LUAI_FUNC TStatus luaE_resetthread (lua_State *L, TStatus status); #endif -- cgit v1.2.3-55-g6feb