From 02318e26169cc3ba2cfc0a3a7f4ba84781e9bcd8 Mon Sep 17 00:00:00 2001 From: Zebin Wu Date: Sat, 23 Dec 2023 16:20:18 +0800 Subject: [PATCH] lua: update lua version to v5.4.6 --- bridge/src/lc.c | 8 ++++---- third_party/lua/lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bridge/src/lc.c b/bridge/src/lc.c index 93260cd..900cde4 100644 --- a/bridge/src/lc.c +++ b/bridge/src/lc.c @@ -193,14 +193,14 @@ lua_State *lc_newthread(lua_State *L) { return co; } -static void lc_freethread(lua_State *L) { +static void lc_freethread(lua_State *L, lua_State *from) { if (thread_pool_full()) { lua_pushnil(L); lua_rawsetp(L, LUA_REGISTRYINDEX, L); } else { thread_pool_enque(L); } - lua_resetthread(L); + lua_closethread(L, from); } int lc_resume(lua_State *L, lua_State *from, int narg, int *nres) { @@ -216,13 +216,13 @@ int lc_resume(lua_State *L, lua_State *from, int narg, int *nres) { luaL_error(L, "too many arguments to resume"); } lua_xmove(L, from, *nres); - lc_freethread(L); + lc_freethread(L, from); break; case LUA_YIELD: break; default: luaL_traceback(from, L, lua_tostring(L, -1), 1); - lc_freethread(L); + lc_freethread(L, from); break; } return status; diff --git a/third_party/lua/lua b/third_party/lua/lua index edfde61..b2613be 160000 --- a/third_party/lua/lua +++ b/third_party/lua/lua @@ -1 +1 @@ -Subproject commit edfde61ee437ba1698430b6ff37c313088538d8d +Subproject commit b2613befc9ce825f9c1fb635f94d181a6edc494a