aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-28 14:17:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-28 14:17:53 -0300
commitade585bdf9e286a0ec01796763ded6701c6b1a8f (patch)
treea578c006fc70e54114e1056bbbf8a014ccc30721 /ldo.c
parent04c41444e22740119d3c017830276d6590b09747 (diff)
downloadlua-ade585bdf9e286a0ec01796763ded6701c6b1a8f.tar.gz
lua-ade585bdf9e286a0ec01796763ded6701c6b1a8f.tar.bz2
lua-ade585bdf9e286a0ec01796763ded6701c6b1a8f.zip
no more LUA_FIRSTINDEX
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 8e241e8d..23c0d7a3 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.18 2005/03/16 20:02:48 roberto Exp roberto $ 2** $Id: ldo.c,v 2.19 2005/03/18 18:55:09 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*/
@@ -202,7 +202,7 @@ static StkId adjust_varargs (lua_State *L, int nfixargs, int actual,
202 luaC_checkGC(L); 202 luaC_checkGC(L);
203 htab = luaH_new(L, nvar, 1); /* create `arg' table */ 203 htab = luaH_new(L, nvar, 1); /* create `arg' table */
204 for (i=0; i<nvar; i++) /* put extra arguments into `arg' table */ 204 for (i=0; i<nvar; i++) /* put extra arguments into `arg' table */
205 setobj2n(L, luaH_setnum(L, htab, i+LUA_FIRSTINDEX), L->top - nvar + i); 205 setobj2n(L, luaH_setnum(L, htab, i+1), L->top - nvar + i);
206 /* store counter in field `n' */ 206 /* store counter in field `n' */
207 setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), 207 setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")),
208 cast(lua_Number, nvar)); 208 cast(lua_Number, nvar));