diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-02 16:41:43 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-02 16:41:43 -0300 |
commit | 6443185167c77adcc8552a3fee7edab7895db1a9 (patch) | |
tree | 20add1421687313b7dcb4b9481771ed60d21d3c5 /lcorolib.c | |
parent | e15f1f2bb7a38a3c94519294d031e48508d65006 (diff) | |
download | lua-6443185167c77adcc8552a3fee7edab7895db1a9.tar.gz lua-6443185167c77adcc8552a3fee7edab7895db1a9.tar.bz2 lua-6443185167c77adcc8552a3fee7edab7895db1a9.zip |
"Emergency" new version 5.4.6v5.4.6
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
Diffstat (limited to 'lcorolib.c')
-rw-r--r-- | lcorolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |