diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-26 11:02:41 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-03-26 11:02:41 -0300 |
commit | 4c5d7b2dddeb853b61489d02b738572eb29cb323 (patch) | |
tree | 98fd0c7ad24d788bb60c8aee568fad856f630b89 /ltable.c | |
parent | d7cb62286642b0f5c16057373ff129109e1a3e8a (diff) | |
download | lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.gz lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.bz2 lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.zip |
small optimization for {f()}
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 1.138 2003/12/09 16:56:11 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.1 2003/12/10 12:13:36 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 | */ |
@@ -270,7 +270,7 @@ static void setnodevector (lua_State *L, Table *t, int lsize) { | |||
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
273 | static void resize (lua_State *L, Table *t, int nasize, int nhsize) { | 273 | void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) { |
274 | int i; | 274 | int i; |
275 | int oldasize = t->sizearray; | 275 | int oldasize = t->sizearray; |
276 | int oldhsize = t->lsizenode; | 276 | int oldhsize = t->lsizenode; |
@@ -315,7 +315,7 @@ static void resize (lua_State *L, Table *t, int nasize, int nhsize) { | |||
315 | static void rehash (lua_State *L, Table *t) { | 315 | static void rehash (lua_State *L, Table *t) { |
316 | int nasize, nhsize; | 316 | int nasize, nhsize; |
317 | numuse(t, &nasize, &nhsize); /* compute new sizes for array and hash parts */ | 317 | numuse(t, &nasize, &nhsize); /* compute new sizes for array and hash parts */ |
318 | resize(L, t, nasize, luaO_log2(nhsize)+1); | 318 | luaH_resize(L, t, nasize, luaO_log2(nhsize)+1); |
319 | } | 319 | } |
320 | 320 | ||
321 | 321 | ||