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.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 0e1cb01e..18ab4900 100644 --- a/lstate.c +++ b/lstate.c @@ -320,7 +320,7 @@ void luaE_freethread (lua_State *L, lua_State *L1) { } -int luaE_resetthread (lua_State *L, int status) { +TStatus luaE_resetthread (lua_State *L, TStatus status) { CallInfo *ci = L->ci = &L->base_ci; /* unwind CallInfo list */ setnilvalue(s2v(L->stack.p)); /* 'function' entry for basic 'ci' */ ci->func.p = L->stack.p; @@ -340,12 +340,12 @@ int luaE_resetthread (lua_State *L, int status) { LUA_API int lua_closethread (lua_State *L, lua_State *from) { - int status; + TStatus status; lua_lock(L); L->nCcalls = (from) ? getCcalls(from) : 0; status = luaE_resetthread(L, L->status); lua_unlock(L); - return status; + return APIstatus(status); } -- cgit v1.2.3-55-g6feb