lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d5ceb369b1339d92c39bb2a0fb9c30ce6905c569
parent 86a4de256e88844e34535901d25923aa851d963e
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu,  7 Feb 2002 15:25:48 -0200

boolean type must be 0 or 1

Diffstat:
Mltable.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ltable.c b/ltable.c @@ -52,7 +52,7 @@ #define hashnum(t,n) \ (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 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)))) @@ -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