aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/lcorolib.c
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-08-24 09:21:38 +0800
committerLi Jin <dragon-fly@qq.com>2023-08-24 09:21:38 +0800
commitcfcea12ba0e6a40d7c04ac64c75563db0896985c (patch)
tree8ee7c6d9cd5f7b60fd9bda035b703cc9969ab678 /src/3rdParty/lua/lcorolib.c
parenteb48c686a7ab5bd3f3f3a8628ed0423872a932c6 (diff)
downloadyuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.tar.gz
yuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.tar.bz2
yuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.zip
update Lua 5.4.
Diffstat (limited to 'src/3rdParty/lua/lcorolib.c')
-rw-r--r--src/3rdParty/lua/lcorolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdParty/lua/lcorolib.c b/src/3rdParty/lua/lcorolib.c
index 40b880b..c64adf0 100644
--- a/src/3rdParty/lua/lcorolib.c
+++ b/src/3rdParty/lua/lcorolib.c
@@ -76,7 +76,7 @@ static int luaB_auxwrap (lua_State *L) {
76 if (l_unlikely(r < 0)) { /* error? */ 76 if (l_unlikely(r < 0)) { /* error? */
77 int stat = lua_status(co); 77 int stat = lua_status(co);
78 if (stat != LUA_OK && stat != LUA_YIELD) { /* error in the coroutine? */ 78 if (stat != LUA_OK && stat != LUA_YIELD) { /* error in the coroutine? */
79 stat = lua_resetthread(co, L); /* close its tbc variables */ 79 stat = lua_closethread(co, L); /* close its tbc variables */
80 lua_assert(stat != LUA_OK); 80 lua_assert(stat != LUA_OK);
81 lua_xmove(co, L, 1); /* move error message to the caller */ 81 lua_xmove(co, L, 1); /* move error message to the caller */
82 } 82 }
@@ -172,7 +172,7 @@ static int luaB_close (lua_State *L) {
172 int status = auxstatus(L, co); 172 int status = auxstatus(L, co);
173 switch (status) { 173 switch (status) {
174 case COS_DEAD: case COS_YIELD: { 174 case COS_DEAD: case COS_YIELD: {
175 status = lua_resetthread(co, L); 175 status = lua_closethread(co, L);
176 if (status == LUA_OK) { 176 if (status == LUA_OK) {
177 lua_pushboolean(L, 1); 177 lua_pushboolean(L, 1);
178 return 1; 178 return 1;