From a00013c8d0d268616e004715da499e88e03b534c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 3 Mar 2015 16:53:13 -0300 Subject: [PATCH] 'point2int' -> 'point2uint' (to reflect its actual result type) --- llimits.h | 6 +++--- ltable.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llimits.h b/llimits.h index 348cd9a1..961ff53b 100644 --- a/llimits.h +++ b/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.130 2015/02/05 17:15:33 roberto Exp roberto $ +** $Id: llimits.h,v 1.131 2015/02/09 15:41:56 roberto Exp roberto $ ** Limits, basic types, and some other 'installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -52,11 +52,11 @@ typedef unsigned char lu_byte; /* -** conversion of pointer to integer: +** conversion of pointer to unsigned integer: ** this is for hashing only; there is no problem if the integer ** cannot hold the whole pointer value */ -#define point2int(p) ((unsigned int)((size_t)(p) & UINT_MAX)) +#define point2uint(p) ((unsigned int)((size_t)(p) & UINT_MAX)) diff --git a/ltable.c b/ltable.c index 5f4148eb..ea4751ae 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.104 2015/02/20 14:05:01 roberto Exp roberto $ +** $Id: ltable.c,v 2.105 2015/02/20 14:27:53 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -70,7 +70,7 @@ #define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) -#define hashpointer(t,p) hashmod(t, point2int(p)) +#define hashpointer(t,p) hashmod(t, point2uint(p)) #define dummynode (&dummynode_)