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 --- lapi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 7b30617f..b3062072 100644 --- a/lapi.c +++ b/lapi.c @@ -1070,7 +1070,7 @@ static void f_call (lua_State *L, void *ud) { LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction k) { struct CallS c; - int status; + TStatus status; ptrdiff_t func; lua_lock(L); api_check(L, k == NULL || !isLua(L->ci), @@ -1107,14 +1107,14 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, } adjustresults(L, nresults); lua_unlock(L); - return status; + return APIstatus(status); } LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode) { ZIO z; - int status; + TStatus status; lua_lock(L); if (!chunkname) chunkname = "?"; luaZ_init(L, &z, reader, data); @@ -1131,7 +1131,7 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, } } lua_unlock(L); - return status; + return APIstatus(status); } @@ -1154,7 +1154,7 @@ LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data, int strip) { LUA_API int lua_status (lua_State *L) { - return L->status; + return APIstatus(L->status); } -- cgit v1.2.3-55-g6feb