diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-03 18:50:25 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-03 18:50:25 -0200 |
commit | c78940f21a956064ac79f715af072e283538f35c (patch) | |
tree | 5a879991ef8d68bbfd437f35ab1da8b761bf9f14 /ltable.c | |
parent | 8b239eeba13877955b976ccd119ada038b67fa59 (diff) | |
download | lua-c78940f21a956064ac79f715af072e283538f35c.tar.gz lua-c78940f21a956064ac79f715af072e283538f35c.tar.bz2 lua-c78940f21a956064ac79f715af072e283538f35c.zip |
static names do not need `luaX_' prefix
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.9 2004/11/24 19:16:03 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.10 2004/11/24 19:20:21 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -124,7 +124,7 @@ static int arrayindex (const TValue *key) { | |||
124 | ** elements in the array part, then elements in the hash part. The | 124 | ** elements in the array part, then elements in the hash part. The |
125 | ** beginning and end of a traversal are signalled by -1. | 125 | ** beginning and end of a traversal are signalled by -1. |
126 | */ | 126 | */ |
127 | static int luaH_index (lua_State *L, Table *t, StkId key) { | 127 | static int findindex (lua_State *L, Table *t, StkId key) { |
128 | int i; | 128 | int i; |
129 | if (ttisnil(key)) return -1; /* first iteration */ | 129 | if (ttisnil(key)) return -1; /* first iteration */ |
130 | i = arrayindex(key); | 130 | i = arrayindex(key); |
@@ -142,7 +142,7 @@ static int luaH_index (lua_State *L, Table *t, StkId key) { | |||
142 | 142 | ||
143 | 143 | ||
144 | int luaH_next (lua_State *L, Table *t, StkId key) { | 144 | int luaH_next (lua_State *L, Table *t, StkId key) { |
145 | int i = luaH_index(L, t, key); /* find original element */ | 145 | int i = findindex(L, t, key); /* find original element */ |
146 | for (i++; i < t->sizearray; i++) { /* try first array part */ | 146 | for (i++; i < t->sizearray; i++) { /* try first array part */ |
147 | if (!ttisnil(&t->array[i])) { /* a non-nil value? */ | 147 | if (!ttisnil(&t->array[i])) { /* a non-nil value? */ |
148 | setnvalue(key, cast(lua_Number, i+1)); | 148 | setnvalue(key, cast(lua_Number, i+1)); |