summaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-05-10 14:50:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-05-10 14:50:51 -0300
commit7e41612eb28ff0fba282bd419781fcbc9bd94776 (patch)
treee63123d15589435c08c844b0d471b142c924818b /ldo.c
parentb0f341ee52ee7d3d22261a68caf06eab5b0c8822 (diff)
downloadlua-7e41612eb28ff0fba282bd419781fcbc9bd94776.tar.gz
lua-7e41612eb28ff0fba282bd419781fcbc9bd94776.tar.bz2
lua-7e41612eb28ff0fba282bd419781fcbc9bd94776.zip
code parameterized by LUA_FIRSTINDEX (first index of an array)
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 e13eec5a..f2682670 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.2 2004/03/23 17:02:58 roberto Exp roberto $ 2** $Id: ldo.c,v 2.3 2004/04/30 20:13:38 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*/
@@ -193,7 +193,7 @@ static void adjust_varargs (lua_State *L, int nfixargs, StkId base) {
193 actual -= nfixargs; /* number of extra arguments */ 193 actual -= nfixargs; /* number of extra arguments */
194 htab = luaH_new(L, actual, 1); /* create `arg' table */ 194 htab = luaH_new(L, actual, 1); /* create `arg' table */
195 for (i=0; i<actual; i++) /* put extra arguments into `arg' table */ 195 for (i=0; i<actual; i++) /* put extra arguments into `arg' table */
196 setobj2n(L, luaH_setnum(L, htab, i+1), L->top - actual + i); 196 setobj2n(L, luaH_setnum(L, htab, i+LUA_FIRSTINDEX), L->top - actual + i);
197 /* store counter in field `n' */ 197 /* store counter in field `n' */
198 setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), 198 setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")),
199 cast(lua_Number, actual)); 199 cast(lua_Number, actual));