aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-10 13:39:35 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-10 13:39:35 -0200
commitd915cf4f9dbe525f8faeb4cb04df13d5f08692da (patch)
treeb166ca7e66e02999fee1500363c4d301b7e53951 /ltable.c
parent53fb65d39451f9245d8ed555f941829520ee6f24 (diff)
downloadlua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.tar.gz
lua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.tar.bz2
lua-d915cf4f9dbe525f8faeb4cb04df13d5f08692da.zip
ways to measure number of `blocks' for GC + details
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ltable.c b/ltable.c
index e16fe5da..eceff082 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.27 1999/10/19 13:33:22 roberto Exp roberto $ 2** $Id: ltable.c,v 1.28 1999/10/26 10:53:40 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*/
@@ -26,7 +26,7 @@
26#include "lua.h" 26#include "lua.h"
27 27
28 28
29#define gcsize(n) (1+(n/16)) 29#define gcsize(n) numblocks(n*2, sizeof(Hash))
30 30
31 31
32 32
@@ -48,16 +48,16 @@ Node *luaH_mainposition (const Hash *t, const TObject *key) {
48 h = tsvalue(key)->hash; 48 h = tsvalue(key)->hash;
49 break; 49 break;
50 case LUA_T_ARRAY: 50 case LUA_T_ARRAY:
51 h = (IntPoint)avalue(key); 51 h = IntPoint(avalue(key));
52 break; 52 break;
53 case LUA_T_PROTO: 53 case LUA_T_PROTO:
54 h = (IntPoint)tfvalue(key); 54 h = IntPoint(tfvalue(key));
55 break; 55 break;
56 case LUA_T_CPROTO: 56 case LUA_T_CPROTO:
57 h = (IntPoint)fvalue(key); 57 h = IntPoint(fvalue(key));
58 break; 58 break;
59 case LUA_T_CLOSURE: 59 case LUA_T_CLOSURE:
60 h = (IntPoint)clvalue(key); 60 h = IntPoint(clvalue(key));
61 break; 61 break;
62 default: 62 default:
63 lua_error("unexpected type to index table"); 63 lua_error("unexpected type to index table");