diff -u -Nr lua-5.4.5/Makefile lua-5.4.6/Makefile --- lua-5.4.5/Makefile 2023-04-11 11:29:22.000000000 -0300 +++ lua-5.4.6/Makefile 2023-05-02 17:06:08.000000000 -0300 @@ -46,7 +46,7 @@ # Lua version and release. V= 5.4 -R= $V.5 +R= $V.6 # Targets start here. all: $(PLAT) diff -u -Nr lua-5.4.5/README lua-5.4.6/README --- lua-5.4.5/README 2023-04-18 09:53:01.000000000 -0300 +++ lua-5.4.6/README 2023-05-02 17:12:04.000000000 -0300 @@ -1,5 +1,5 @@ -This is Lua 5.4.5, released on 18 Apr 2023. +This is Lua 5.4.6, released on 02 May 2023. For installation instructions, license details, and further information about Lua, see doc/readme.html. diff -u -Nr lua-5.4.5/doc/manual.html lua-5.4.6/doc/manual.html --- lua-5.4.5/doc/manual.html 2023-04-18 09:51:26.000000000 -0300 +++ lua-5.4.6/doc/manual.html 2023-05-02 17:09:39.000000000 -0300 @@ -3846,6 +3846,35 @@ +

lua_closethread

+[-0, +?, –] +

int lua_closethread (lua_State *L, lua_State *from);
+ +

+Resets a thread, cleaning its call stack and closing all pending +to-be-closed variables. +Returns a status code: +LUA_OK for no errors in the thread +(either the original error that stopped the thread or +errors in closing methods), +or an error status otherwise. +In case of error, +leaves the error object on the top of the stack. + + +

+The parameter from represents the coroutine that is resetting L. +If there is no such coroutine, +this parameter can be NULL. + + +

+(This function was introduced in release 5.4.6.) + + + + +


lua_compare

[-0, +0, e]

int lua_compare (lua_State *L, int index1, int index2, int op);
@@ -5219,25 +5248,12 @@

lua_resetthread

[-0, +?, –] -

int lua_resetthread (lua_State *L, lua_State *from);
- -

-Resets a thread, cleaning its call stack and closing all pending -to-be-closed variables. -Returns a status code: -LUA_OK for no errors in the thread -(either the original error that stopped the thread or -errors in closing methods), -or an error status otherwise. -In case of error, -leaves the error object on the top of the stack. - +

int lua_resetthread (lua_State *L);

-The parameter from represents the coroutine that is resetting L. -If there is no such coroutine, -this parameter can be NULL. -(This parameter was introduced in release 5.4.5.) +This function is deprecated; +it is equivalent to lua_closethread with +from being NULL. @@ -12020,10 +12036,10 @@

diff -u -Nr lua-5.4.5/doc/readme.html lua-5.4.6/doc/readme.html --- lua-5.4.5/doc/readme.html 2023-03-27 18:22:07.000000000 -0300 +++ lua-5.4.6/doc/readme.html 2023-05-02 17:08:55.000000000 -0300 @@ -107,7 +107,7 @@
  1. Open a terminal window and move to -the top-level directory, which is named lua-5.4.5. +the top-level directory, which is named lua-5.4.6. The Makefile there controls both the build process and the installation process.

  2. @@ -327,10 +327,10 @@ diff -u -Nr lua-5.4.5/src/lcorolib.c lua-5.4.6/src/lcorolib.c --- lua-5.4.5/src/lcorolib.c 2023-04-13 09:24:27.000000000 -0300 +++ lua-5.4.6/src/lcorolib.c 2023-05-02 17:02:29.000000000 -0300 @@ -76,7 +76,7 @@ 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 @@ 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 -u -Nr lua-5.4.5/src/lstate.c lua-5.4.6/src/lstate.c --- lua-5.4.5/src/lstate.c 2023-04-13 09:24:28.000000000 -0300 +++ lua-5.4.6/src/lstate.c 2023-05-02 17:02:30.000000000 -0300 @@ -339,7 +339,7 @@ } -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 @@ } +/* +** 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 -u -Nr lua-5.4.5/src/lua.h lua-5.4.6/src/lua.h --- lua-5.4.5/src/lua.h 2023-04-13 09:24:29.000000000 -0300 +++ lua-5.4.6/src/lua.h 2023-05-02 17:02:30.000000000 -0300 @@ -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 @@ 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);