diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.19 2005/03/18 18:55:09 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.20 2005/03/28 17:17:53 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 | */ |
@@ -197,6 +197,7 @@ static StkId adjust_varargs (lua_State *L, int nfixargs, int actual, | |||
197 | for (; actual < nfixargs; ++actual) | 197 | for (; actual < nfixargs; ++actual) |
198 | setnilvalue(L->top++); | 198 | setnilvalue(L->top++); |
199 | } | 199 | } |
200 | #if LUA_COMPAT_VARARG | ||
200 | if (style != NEWSTYLEVARARG) { /* compatibility with old-style vararg */ | 201 | if (style != NEWSTYLEVARARG) { /* compatibility with old-style vararg */ |
201 | int nvar = actual - nfixargs; /* number of extra arguments */ | 202 | int nvar = actual - nfixargs; /* number of extra arguments */ |
202 | luaC_checkGC(L); | 203 | luaC_checkGC(L); |
@@ -207,6 +208,7 @@ static StkId adjust_varargs (lua_State *L, int nfixargs, int actual, | |||
207 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), | 208 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), |
208 | cast(lua_Number, nvar)); | 209 | cast(lua_Number, nvar)); |
209 | } | 210 | } |
211 | #endif | ||
210 | /* move fixed parameters to final position */ | 212 | /* move fixed parameters to final position */ |
211 | fixed = L->top - actual; /* first fixed argument */ | 213 | fixed = L->top - actual; /* first fixed argument */ |
212 | base = L->top; /* final position of first argument */ | 214 | base = L->top; /* final position of first argument */ |