Browse Source

boolean type must be 0 or 1

Roberto Ierusalimschy 23 years ago
parent
commit
d5ceb369b1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ltable.c

+ 2 - 2
ltable.c

@@ -52,7 +52,7 @@
 #define hashnum(t,n)	\
 #define hashnum(t,n)	\
            (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t))))
            (node(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t))))
 #define hashstr(t,str)	 (node(t, lmod((str)->tsv.hash, sizenode(t))))
 #define hashstr(t,str)	 (node(t, lmod((str)->tsv.hash, sizenode(t))))
-#define hashboolean(t,p) (node(t, lmod(p, sizenode(t))))
+#define hashboolean(t,p) (node(t, p))  /* `p' in [0,1] < minimum table size */
 #define hashpointer(t,p) (node(t, lmod(IntPoint(p), sizenode(t))))
 #define hashpointer(t,p) (node(t, lmod(IntPoint(p), sizenode(t))))
 
 
 
 
@@ -192,7 +192,7 @@ static void numuse (const Table *t, int *narray, int *nhash) {
 
 
 
 
 /*
 /*
-** (log of) minimum size for hash part of a table
+** (log2 of) minimum size for hash part of a table
 */
 */
 #define MINHASHSIZE	1
 #define MINHASHSIZE	1