macro with empty argument can be seen as macro with no argument; better

to avoid that
This commit is contained in:
Roberto Ierusalimschy 2015-11-12 16:08:58 -02:00
parent bde03eeb48
commit 04587b6256
1 changed files with 3 additions and 3 deletions

6
lvm.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lvm.c,v 2.259 2015/11/02 14:06:01 roberto Exp roberto $ ** $Id: lvm.c,v 2.260 2015/11/02 18:48:07 roberto Exp roberto $
** Lua virtual machine ** Lua virtual machine
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -1115,7 +1115,7 @@ void luaV_execute (lua_State *L) {
if (luaD_precall(L, ra, nresults)) { /* C function? */ if (luaD_precall(L, ra, nresults)) { /* C function? */
if (nresults >= 0) if (nresults >= 0)
L->top = ci->top; /* adjust results */ L->top = ci->top; /* adjust results */
Protect(); /* update 'base' */ Protect((void)0); /* update 'base' */
} }
else { /* Lua function */ else { /* Lua function */
ci = L->ci; ci = L->ci;
@ -1128,7 +1128,7 @@ void luaV_execute (lua_State *L) {
if (b != 0) L->top = ra+b; /* else previous instruction set top */ if (b != 0) L->top = ra+b; /* else previous instruction set top */
lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); lua_assert(GETARG_C(i) - 1 == LUA_MULTRET);
if (luaD_precall(L, ra, LUA_MULTRET)) { /* C function? */ if (luaD_precall(L, ra, LUA_MULTRET)) { /* C function? */
Protect(); /* update 'base' */ Protect((void)0); /* update 'base' */
} }
else { else {
/* tail call: put called frame (n) in place of caller one (o) */ /* tail call: put called frame (n) in place of caller one (o) */