mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Cleaning 'luaP_isIT' and 'luaP_isOT'
- 'luaP_isOT' is only used for tests, so it is defined as a macro to avoid wasting space with an unused function. - 'luaP_isIT' must include OP_VARARGPREP.
This commit is contained in:
parent
53b41d0cdd
commit
0465c23b3e
3 changed files with 17 additions and 23 deletions
2
lcode.c
2
lcode.c
|
|
@ -1934,8 +1934,6 @@ void luaK_finish (FuncState *fs) {
|
|||
p->flag &= cast_byte(~PF_VAHID); /* then it will not use hidden args. */
|
||||
for (i = 0; i < fs->pc; i++) {
|
||||
Instruction *pc = &p->code[i];
|
||||
/* 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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue