diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-11-12 16:08:58 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-11-12 16:08:58 -0200 |
commit | 04587b62562f246e89d1b138bed5b90ee4bdfe69 (patch) | |
tree | f4c2a62fd98b80f4129aae0514ebf80054e36ddb | |
parent | bde03eeb489fff399715b17465ac07fdbb33acf1 (diff) | |
download | lua-04587b62562f246e89d1b138bed5b90ee4bdfe69.tar.gz lua-04587b62562f246e89d1b138bed5b90ee4bdfe69.tar.bz2 lua-04587b62562f246e89d1b138bed5b90ee4bdfe69.zip |
macro with empty argument can be seen as macro with no argument; better
to avoid that
-rw-r--r-- | lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.259 2015/11/02 14:06:01 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.260 2015/11/02 18:48:07 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1115,7 +1115,7 @@ void luaV_execute (lua_State *L) { | |||
1115 | if (luaD_precall(L, ra, nresults)) { /* C function? */ | 1115 | if (luaD_precall(L, ra, nresults)) { /* C function? */ |
1116 | if (nresults >= 0) | 1116 | if (nresults >= 0) |
1117 | L->top = ci->top; /* adjust results */ | 1117 | L->top = ci->top; /* adjust results */ |
1118 | Protect(); /* update 'base' */ | 1118 | Protect((void)0); /* update 'base' */ |
1119 | } | 1119 | } |
1120 | else { /* Lua function */ | 1120 | else { /* Lua function */ |
1121 | ci = L->ci; | 1121 | ci = L->ci; |
@@ -1128,7 +1128,7 @@ void luaV_execute (lua_State *L) { | |||
1128 | if (b != 0) L->top = ra+b; /* else previous instruction set top */ | 1128 | if (b != 0) L->top = ra+b; /* else previous instruction set top */ |
1129 | lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); | 1129 | lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); |
1130 | if (luaD_precall(L, ra, LUA_MULTRET)) { /* C function? */ | 1130 | if (luaD_precall(L, ra, LUA_MULTRET)) { /* C function? */ |
1131 | Protect(); /* update 'base' */ | 1131 | Protect((void)0); /* update 'base' */ |
1132 | } | 1132 | } |
1133 | else { | 1133 | else { |
1134 | /* tail call: put called frame (n) in place of caller one (o) */ | 1134 | /* tail call: put called frame (n) in place of caller one (o) */ |