diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-10 14:50:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-10 14:50:51 -0300 |
commit | 7e41612eb28ff0fba282bd419781fcbc9bd94776 (patch) | |
tree | e63123d15589435c08c844b0d471b142c924818b /ltests.c | |
parent | b0f341ee52ee7d3d22261a68caf06eab5b0c8822 (diff) | |
download | lua-7e41612eb28ff0fba282bd419781fcbc9bd94776.tar.gz lua-7e41612eb28ff0fba282bd419781fcbc9bd94776.tar.bz2 lua-7e41612eb28ff0fba282bd419781fcbc9bd94776.zip |
code parameterized by LUA_FIRSTINDEX (first index of an array)
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.4 2004/03/23 17:07:53 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.5 2004/04/30 20:13:38 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -418,7 +418,7 @@ static int listk (lua_State *L) { | |||
418 | lua_createtable(L, p->sizek, 0); | 418 | lua_createtable(L, p->sizek, 0); |
419 | for (i=0; i<p->sizek; i++) { | 419 | for (i=0; i<p->sizek; i++) { |
420 | luaA_pushobject(L, p->k+i); | 420 | luaA_pushobject(L, p->k+i); |
421 | lua_rawseti(L, -2, i+1); | 421 | lua_rawseti(L, -2, i+LUA_FIRSTINDEX); |
422 | } | 422 | } |
423 | return 1; | 423 | return 1; |
424 | } | 424 | } |