From 6ccd24eff58340c00db2877c4558a63c6b859442 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 19 Jan 2021 10:03:13 -0300 Subject: 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. --- lstate.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lstate.h') 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 { int basehookcount; int hookcount; volatile l_signalT hookmask; + StkId ptbc; /* pending to-be-closed variable */ }; -- cgit v1.2.3-55-g6feb