diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-07 15:26:10 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-07 15:26:10 -0200 |
| commit | d5ceb369b1339d92c39bb2a0fb9c30ce6905c569 (patch) | |
| tree | 3a2a632a40c06f7ec59c5d86ab3d3726f793b530 | |
| parent | 86a4de256e88844e34535901d25923aa851d963e (diff) | |
| download | lua-d5ceb369b1339d92c39bb2a0fb9c30ce6905c569.tar.gz lua-d5ceb369b1339d92c39bb2a0fb9c30ce6905c569.tar.bz2 lua-d5ceb369b1339d92c39bb2a0fb9c30ce6905c569.zip | |
boolean type must be 0 or 1
| -rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -52,7 +52,7 @@ | |||
| 52 | #define hashnum(t,n) \ | 52 | #define hashnum(t,n) \ |
| 53 | (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t)))) | 53 | (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t)))) |
| 54 | #define hashstr(t,str) (node(t, lmod((str)->tsv.hash, sizenode(t)))) | 54 | #define hashstr(t,str) (node(t, lmod((str)->tsv.hash, sizenode(t)))) |
| 55 | #define hashboolean(t,p) (node(t, lmod(p, sizenode(t)))) | 55 | #define hashboolean(t,p) (node(t, p)) /* `p' in [0,1] < minimum table size */ |
| 56 | #define hashpointer(t,p) (node(t, lmod(IntPoint(p), sizenode(t)))) | 56 | #define hashpointer(t,p) (node(t, lmod(IntPoint(p), sizenode(t)))) |
| 57 | 57 | ||
| 58 | 58 | ||
| @@ -192,7 +192,7 @@ static void numuse (const Table *t, int *narray, int *nhash) { | |||
| 192 | 192 | ||
| 193 | 193 | ||
| 194 | /* | 194 | /* |
| 195 | ** (log of) minimum size for hash part of a table | 195 | ** (log2 of) minimum size for hash part of a table |
| 196 | */ | 196 | */ |
| 197 | #define MINHASHSIZE 1 | 197 | #define MINHASHSIZE 1 |
| 198 | 198 | ||
