From 96f77142374da8a4a7d4e5e8afd559fbaf0430e8 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 30 Aug 2023 10:44:28 -0300 Subject: Field 'Proto.is_vararg' uses only one bit So that the other bits can be used for other purposes. --- lparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 81c6df22..a1164510 100644 --- a/lparser.c +++ b/lparser.c @@ -959,7 +959,7 @@ static void constructor (LexState *ls, expdesc *t) { static void setvararg (FuncState *fs, int nparams) { - fs->f->is_vararg = 1; + fs->f->flag |= PF_ISVARARG; luaK_codeABC(fs, OP_VARARGPREP, nparams, 0, 0); } @@ -1177,7 +1177,7 @@ static void simpleexp (LexState *ls, expdesc *v) { } case TK_DOTS: { /* vararg */ FuncState *fs = ls->fs; - check_condition(ls, fs->f->is_vararg, + check_condition(ls, fs->f->flag & PF_ISVARARG, "cannot use '...' outside a vararg function"); init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 0, 1)); break; -- cgit v1.2.3-55-g6feb