From 6ac7219da31df0238dc33c2d4457f69bfe0c1e79 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 27 Jun 2024 15:01:57 -0300 Subject: 'isIT'/'isOT' turned from macros to functions --- lcode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index a74c2a16..e120f0db 100644 --- a/lcode.c +++ b/lcode.c @@ -1844,7 +1844,9 @@ void luaK_finish (FuncState *fs) { Proto *p = fs->f; for (i = 0; i < fs->pc; i++) { Instruction *pc = &p->code[i]; - lua_assert(i == 0 || isOT(*(pc - 1)) == isIT(*pc)); + /* avoid "not used" warnings when assert is off (for 'onelua.c') */ + (void)luaP_isOT; (void)luaP_isIT; + lua_assert(i == 0 || luaP_isOT(*(pc - 1)) == luaP_isIT(*pc)); switch (GET_OPCODE(*pc)) { case OP_RETURN0: case OP_RETURN1: { if (!(fs->needclose || (p->flag & PF_ISVARARG))) -- cgit v1.2.3-55-g6feb