aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-30 11:41:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-30 11:41:39 -0300
commitd1e677c52be3b107a7a29fdc482158f6d9251e79 (patch)
tree6b201f229a9dc1f0752f6544b71498a4d528941d /lfunc.c
parentf7439112a5469078ac4f444106242cf1c1d3fe8a (diff)
downloadlua-d1e677c52be3b107a7a29fdc482158f6d9251e79.tar.gz
lua-d1e677c52be3b107a7a29fdc482158f6d9251e79.tar.bz2
lua-d1e677c52be3b107a7a29fdc482158f6d9251e79.zip
New type 'TStatus' for thread status/error codes
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lfunc.c b/lfunc.c
index 0ea05e00..d6853ff8 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -140,7 +140,8 @@ static void checkclosemth (lua_State *L, StkId level) {
140** the 'level' of the upvalue being closed, as everything after that 140** the 'level' of the upvalue being closed, as everything after that
141** won't be used again. 141** won't be used again.
142*/ 142*/
143static void prepcallclosemth (lua_State *L, StkId level, int status, int yy) { 143static void prepcallclosemth (lua_State *L, StkId level, TStatus status,
144 int yy) {
144 TValue *uv = s2v(level); /* value being closed */ 145 TValue *uv = s2v(level); /* value being closed */
145 TValue *errobj; 146 TValue *errobj;
146 if (status == CLOSEKTOP) 147 if (status == CLOSEKTOP)
@@ -224,7 +225,7 @@ static void poptbclist (lua_State *L) {
224** Close all upvalues and to-be-closed variables up to the given stack 225** Close all upvalues and to-be-closed variables up to the given stack
225** level. Return restored 'level'. 226** level. Return restored 'level'.
226*/ 227*/
227StkId luaF_close (lua_State *L, StkId level, int status, int yy) { 228StkId luaF_close (lua_State *L, StkId level, TStatus status, int yy) {
228 ptrdiff_t levelrel = savestack(L, level); 229 ptrdiff_t levelrel = savestack(L, level);
229 luaF_closeupval(L, level); /* first, close the upvalues */ 230 luaF_closeupval(L, level); /* first, close the upvalues */
230 while (L->tbclist.p >= level) { /* traverse tbc's down to that level */ 231 while (L->tbclist.p >= level) { /* traverse tbc's down to that level */