From d915cf4f9dbe525f8faeb4cb04df13d5f08692da Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 10 Nov 1999 13:39:35 -0200 Subject: ways to measure number of `blocks' for GC + details --- ltable.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index e16fe5da..eceff082 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.27 1999/10/19 13:33:22 roberto Exp roberto $ +** $Id: ltable.c,v 1.28 1999/10/26 10:53:40 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -26,7 +26,7 @@ #include "lua.h" -#define gcsize(n) (1+(n/16)) +#define gcsize(n) numblocks(n*2, sizeof(Hash)) @@ -48,16 +48,16 @@ Node *luaH_mainposition (const Hash *t, const TObject *key) { h = tsvalue(key)->hash; break; case LUA_T_ARRAY: - h = (IntPoint)avalue(key); + h = IntPoint(avalue(key)); break; case LUA_T_PROTO: - h = (IntPoint)tfvalue(key); + h = IntPoint(tfvalue(key)); break; case LUA_T_CPROTO: - h = (IntPoint)fvalue(key); + h = IntPoint(fvalue(key)); break; case LUA_T_CLOSURE: - h = (IntPoint)clvalue(key); + h = IntPoint(clvalue(key)); break; default: lua_error("unexpected type to index table"); -- cgit v1.2.3-55-g6feb