aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-12-02 10:06:10 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-12-02 10:06:10 -0200
commit24471525d7eccd14af19a54e84a3cf7a504a90de (patch)
tree24069626cea8564d9a1d13c589145c4fe13c34f2
parent1f55dbc69933d3641a20ada064d2b3d39e58fdaf (diff)
downloadlua-24471525d7eccd14af19a54e84a3cf7a504a90de.tar.gz
lua-24471525d7eccd14af19a54e84a3cf7a504a90de.tar.bz2
lua-24471525d7eccd14af19a54e84a3cf7a504a90de.zip
details
-rw-r--r--ltable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ltable.c b/ltable.c
index d2811feb..a8549cd3 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.123 2002/11/14 16:15:53 roberto Exp roberto $ 2** $Id: ltable.c,v 1.124 2002/11/25 12:38:47 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*/
@@ -55,15 +55,15 @@
55 55
56 56
57#define hashnum(t,n) \ 57#define hashnum(t,n) \
58 (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t)))) 58 (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t))))
59#define hashstr(t,str) (node(t, lmod((str)->tsv.hash, sizenode(t)))) 59#define hashstr(t,str) (node(t, lmod((str)->tsv.hash, sizenode(t))))
60#define hashboolean(t,p) (node(t, lmod(p, sizenode(t)))) 60#define hashboolean(t,p) (node(t, lmod(p, sizenode(t))))
61 61
62/* 62/*
63** avoid modulus by power of 2 for pointers, as they tend to have many 63** avoid modulus by power of 2 for pointers, as they tend to have many
64** 2 factors. 64** 2 factors.
65*/ 65*/
66#define hashpointer(t,p) (node(t, (IntPoint(p) % ((sizenode(t)-1)|1)))) 66#define hashpointer(t,p) (node(t, (IntPoint(p) % ((sizenode(t)-1)|1))))
67 67
68 68
69/* 69/*