From 62d38990a01f472eaf731d64f3934aeef8fb25bd Mon Sep 17 00:00:00 2001 From: DarioS Date: Sun, 14 May 2023 12:23:20 +0200 Subject: [PATCH] lua 5.4.6 : - ricompilazione per nuova versione. --- lcorolib.c | 4 ++-- lstate.c | 10 +++++++++- lua.h | 7 ++++--- lua.rc | Bin 10390 -> 10346 bytes 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lcorolib.c b/lcorolib.c index 40b880b..c64adf0 100644 --- a/lcorolib.c +++ b/lcorolib.c @@ -76,7 +76,7 @@ static int luaB_auxwrap (lua_State *L) { if (l_unlikely(r < 0)) { /* error? */ int stat = lua_status(co); if (stat != LUA_OK && stat != LUA_YIELD) { /* error in the coroutine? */ - stat = lua_resetthread(co, L); /* close its tbc variables */ + stat = lua_closethread(co, L); /* close its tbc variables */ lua_assert(stat != LUA_OK); lua_xmove(co, L, 1); /* move error message to the caller */ } @@ -172,7 +172,7 @@ static int luaB_close (lua_State *L) { int status = auxstatus(L, co); switch (status) { case COS_DEAD: case COS_YIELD: { - status = lua_resetthread(co, L); + status = lua_closethread(co, L); if (status == LUA_OK) { lua_pushboolean(L, 1); return 1; diff --git a/lstate.c b/lstate.c index 1fbefb4..1e925e5 100644 --- a/lstate.c +++ b/lstate.c @@ -339,7 +339,7 @@ int luaE_resetthread (lua_State *L, int status) { } -LUA_API int lua_resetthread (lua_State *L, lua_State *from) { +LUA_API int lua_closethread (lua_State *L, lua_State *from) { int status; lua_lock(L); L->nCcalls = (from) ? getCcalls(from) : 0; @@ -349,6 +349,14 @@ LUA_API int lua_resetthread (lua_State *L, lua_State *from) { } +/* +** Deprecated! Use 'lua_closethread' instead. +*/ +LUA_API int lua_resetthread (lua_State *L) { + return lua_closethread(L, NULL); +} + + LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { int i; lua_State *L; diff --git a/lua.h b/lua.h index 01927c6..fd16cf8 100644 --- a/lua.h +++ b/lua.h @@ -18,10 +18,10 @@ #define LUA_VERSION_MAJOR "5" #define LUA_VERSION_MINOR "4" -#define LUA_VERSION_RELEASE "5" +#define LUA_VERSION_RELEASE "6" #define LUA_VERSION_NUM 504 -#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 5) +#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 6) #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE @@ -163,7 +163,8 @@ extern const char lua_ident[]; LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); LUA_API void (lua_close) (lua_State *L); LUA_API lua_State *(lua_newthread) (lua_State *L); -LUA_API int (lua_resetthread) (lua_State *L, lua_State *from); +LUA_API int (lua_closethread) (lua_State *L, lua_State *from); +LUA_API int (lua_resetthread) (lua_State *L); /* Deprecated! */ LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); diff --git a/lua.rc b/lua.rc index dcc8723d183307006da69b2fefe6fc8a0fa325cb..874b8749819407da084eae38b3789b2ad01c4b46 100644 GIT binary patch delta 227 zcmbOh_$pw-CpJct$q%IrSxp#p7z{QSil{OH1^hWPfdYCAW|I$cZf7=OaG9(qxRKFh zvmtjfNE$=^NB&%ddY}SEInzlJ6<`gKjGGOFxfrqOnl6S@S0Ll$2do^MuSsIpX)BB5 WK6aq{7>pT=kZomT+^nEb#sL7`9Xa&? delta 298 zcmaDAFfDMyCpJdo$-TUWoW=|~3}!%VFj#7b8By8pW_0 p#%#K;8Con;~XQcHn-s`HOrR2LLkrN9+Iq