From 5bb5a1831d04735ecd241062fbbb47dd740ba5f5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Mar 2003 17:26:33 -0300 Subject: [PATCH] details --- ltable.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ltable.c b/ltable.c index 50f33719..db04faaf 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 1.128 2003/02/20 20:12:39 roberto Exp roberto $ +** $Id: ltable.c,v 1.129 2003/03/18 12:50:04 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -54,11 +54,11 @@ #endif - -#define hashnum(t,n) \ - (gnode(t, lmod(cast(lu_hash, cast(ls_hash, n)), sizenode(t)))) -#define hashstr(t,str) (gnode(t, lmod((str)->tsv.hash, sizenode(t)))) -#define hashboolean(t,p) (gnode(t, lmod(p, sizenode(t)))) +#define hashg(t,n) (gnode(t, lmod((n), sizenode(t)))) + +#define hashnum(t,n) hashg(t, cast(lu_hash, cast(ls_hash, (n)))) +#define hashstr(t,str) hashg(t, (str)->tsv.hash) +#define hashboolean(t,p) hashg(t, p) /* ** avoid modulus by power of 2 for pointers, as they tend to have many