mirror of https://github.com/lua/lua
'point2int' -> 'point2uint' (to reflect its actual result type)
This commit is contained in:
parent
b9a1f27250
commit
a00013c8d0
|
@ -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))
|
||||
|
||||
|
||||
|
||||
|
|
4
ltable.c
4
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_)
|
||||
|
|
Loading…
Reference in New Issue