aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-03-26 11:02:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-03-26 11:02:41 -0300
commit4c5d7b2dddeb853b61489d02b738572eb29cb323 (patch)
tree98fd0c7ad24d788bb60c8aee568fad856f630b89 /ltable.c
parentd7cb62286642b0f5c16057373ff129109e1a3e8a (diff)
downloadlua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.gz
lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.tar.bz2
lua-4c5d7b2dddeb853b61489d02b738572eb29cb323.zip
small optimization for {f()}
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltable.c b/ltable.c
index 797690b4..fff4716d 100644
--- a/ltable.c
+++ b/ltable.c
@@ -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
273static void resize (lua_State *L, Table *t, int nasize, int nhsize) { 273void 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) {
315static void rehash (lua_State *L, Table *t) { 315static 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