Browse Source

'point2int' -> 'point2uint' (to reflect its actual result type)

Roberto Ierusalimschy 10 years ago
parent
commit
a00013c8d0
2 changed files with 5 additions and 5 deletions
  1. 3 3
      llimits.h
  2. 2 2
      ltable.c

+ 3 - 3
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))
 
 
 

+ 2 - 2
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_)