From 4c5d7b2dddeb853b61489d02b738572eb29cb323 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Mar 2004 11:02:41 -0300 Subject: small optimization for {f()} --- ltable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 797690b4..fff4716d 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.138 2003/12/09 16:56:11 roberto Exp roberto $ +** $Id: ltable.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -270,7 +270,7 @@ static void setnodevector (lua_State *L, Table *t, int lsize) { } -static void resize (lua_State *L, Table *t, int nasize, int nhsize) { +void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) { int i; int oldasize = t->sizearray; int oldhsize = t->lsizenode; @@ -315,7 +315,7 @@ static void resize (lua_State *L, Table *t, int nasize, int nhsize) { static void rehash (lua_State *L, Table *t) { int nasize, nhsize; numuse(t, &nasize, &nhsize); /* compute new sizes for array and hash parts */ - resize(L, t, nasize, luaO_log2(nhsize)+1); + luaH_resize(L, t, nasize, luaO_log2(nhsize)+1); } -- cgit v1.2.3-55-g6feb