diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-02 10:06:10 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-12-02 10:06:10 -0200 |
commit | 24471525d7eccd14af19a54e84a3cf7a504a90de (patch) | |
tree | 24069626cea8564d9a1d13c589145c4fe13c34f2 | |
parent | 1f55dbc69933d3641a20ada064d2b3d39e58fdaf (diff) | |
download | lua-24471525d7eccd14af19a54e84a3cf7a504a90de.tar.gz lua-24471525d7eccd14af19a54e84a3cf7a504a90de.tar.bz2 lua-24471525d7eccd14af19a54e84a3cf7a504a90de.zip |
details
-rw-r--r-- | ltable.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 | /* |