aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-19 10:03:13 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-19 10:03:13 -0300
commit6ccd24eff58340c00db2877c4558a63c6b859442 (patch)
tree4c8f51657d8d1f4921846a23ba4b475db49fd837 /lstate.h
parentd0f34d91373fa265d4445e456e4a10ce206c1559 (diff)
downloadlua-6ccd24eff58340c00db2877c4558a63c6b859442.tar.gz
lua-6ccd24eff58340c00db2877c4558a63c6b859442.tar.bz2
lua-6ccd24eff58340c00db2877c4558a63c6b859442.zip
Simpler handling of errors when creating tbc variables
New field 'lua_State.ptbc' keeps to-be-closed variable until its upvalue is created, so that it can be closed in case of a memory-allocation error.
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lstate.h b/lstate.h
index 38248e57..65d45264 100644
--- a/lstate.h
+++ b/lstate.h
@@ -308,6 +308,7 @@ struct lua_State {
308 int basehookcount; 308 int basehookcount;
309 int hookcount; 309 int hookcount;
310 volatile l_signalT hookmask; 310 volatile l_signalT hookmask;
311 StkId ptbc; /* pending to-be-closed variable */
311}; 312};
312 313
313 314