diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-28 15:28:40 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-28 15:28:40 -0200 |
commit | 6707ce63491ad5f233f30b1d561ed7f0f0b9a0c8 (patch) | |
tree | be151820c74eb2ebc4655783a100c96504c107aa /ldo.c | |
parent | 257961c601fdec1ea1f9640d460e0d31c39333a1 (diff) | |
download | lua-6707ce63491ad5f233f30b1d561ed7f0f0b9a0c8.tar.gz lua-6707ce63491ad5f233f30b1d561ed7f0f0b9a0c8.tar.bz2 lua-6707ce63491ad5f233f30b1d561ed7f0f0b9a0c8.zip |
function prepares vararg only if it really uses them (chunks
are always declared vararg but seldom uses them)
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.142 2015/10/28 12:06:45 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.143 2015/10/28 12:25:36 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -357,7 +357,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
357 | checkstackp(L, p->maxstacksize, func); | 357 | checkstackp(L, p->maxstacksize, func); |
358 | for (; n < p->numparams; n++) | 358 | for (; n < p->numparams; n++) |
359 | setnilvalue(L->top++); /* complete missing arguments */ | 359 | setnilvalue(L->top++); /* complete missing arguments */ |
360 | if (!p->is_vararg) | 360 | if (p->is_vararg != 1) /* do not use vararg? */ |
361 | base = func + 1; | 361 | base = func + 1; |
362 | else { | 362 | else { |
363 | ptrdiff_t funcr = savestack(L, func); | 363 | ptrdiff_t funcr = savestack(L, func); |