summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-13 13:54:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-13 13:54:10 -0300
commitb07fc10e91a5954254b47280aba287220c734a4b (patch)
treee50d4e5ef9aab68487caf0944e72a7de04bb8bb5 /lstate.c
parentcc1692515e2a6aabc6d07159e7926656e38eda53 (diff)
downloadlua-github-b07fc10e91a5954254b47280aba287220c734a4b.tar.gz
Allow yields inside '__close' metamethods
Initial implementation to allow yields inside '__close' metamethods. This current version still does not allow a '__close' metamethod to yield when called due to an error. '__close' metamethods from C functions also are not allowed to yield.
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index a6ef82a3..92ccbf9b 100644
--- a/lstate.c
+++ b/lstate.c
@@ -313,7 +313,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) {
void luaE_freethread (lua_State *L, lua_State *L1) {
LX *l = fromstate(L1);
- luaF_close(L1, L1->stack, NOCLOSINGMETH); /* close all upvalues */
+ luaF_close(L1, L1->stack, NOCLOSINGMETH, 0); /* close all upvalues */
lua_assert(L1->openupval == NULL);
luai_userstatefree(L, L1);
freestack(L1);