From 3dbf30540892b4b9c86e0cb663069cd478a0c900 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 26 Mar 2009 09:57:01 -0300 Subject: no more support for old-style varargs --- ldo.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index b89a2919..2afcd7af 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.55 2009/03/10 17:14:37 roberto Exp roberto $ +** $Id: ldo.c,v 2.56 2009/03/23 14:26:12 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -205,24 +205,9 @@ void luaD_callhook (lua_State *L, int event, int line) { static StkId adjust_varargs (lua_State *L, Proto *p, int actual) { int i; int nfixargs = p->numparams; - Table *htab = NULL; StkId base, fixed; for (; actual < nfixargs; ++actual) setnilvalue(L->top++); -#if defined(LUA_COMPAT_VARARG) - if (p->is_vararg & VARARG_NEEDSARG) { /* compat. with old-style vararg? */ - int nvar = actual - nfixargs; /* number of extra arguments */ - lua_assert(p->is_vararg & VARARG_HASARG); - luaC_checkGC(L); - htab = luaH_new(L); /* create `arg' table */ - sethvalue(L, L->top++, htab); - for (i=0; itop - nvar + i - 1); - /* store counter in field `n' */ - setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), cast_num(nvar)); - L->top--; - } -#endif /* move fixed parameters to final position */ fixed = L->top - actual; /* first fixed argument */ base = L->top; /* final position of first argument */ @@ -230,11 +215,6 @@ static StkId adjust_varargs (lua_State *L, Proto *p, int actual) { setobjs2s(L, L->top++, fixed+i); setnilvalue(fixed+i); } - /* add `arg' parameter */ - if (htab) { - sethvalue(L, L->top++, htab); - lua_assert(iswhite(obj2gco(htab))); - } return base; } -- cgit v1.2.3-55-g6feb