aboutsummaryrefslogtreecommitdiff
path: root/src/uniquekey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uniquekey.h')
-rw-r--r--src/uniquekey.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uniquekey.h b/src/uniquekey.h
index 015fbf2..7162753 100644
--- a/src/uniquekey.h
+++ b/src/uniquekey.h
@@ -11,9 +11,9 @@ struct s_UniqueKey
11typedef struct s_UniqueKey UniqueKey; 11typedef struct s_UniqueKey UniqueKey;
12 12
13#if LUAJIT_FLAVOR() == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations 13#if LUAJIT_FLAVOR() == 64 // building against LuaJIT headers for 64 bits, light userdata is restricted to 47 significant bits, because LuaJIT uses the other bits for internal optimizations
14#define MAKE_UNIQUE_KEY( p_) ((void*)((ptrdiff_t)(p_) & 0x7fffffffffffull)) 14#define MAKE_UNIQUE_KEY( p_) ((void*)((uintptr_t)(p_) & 0x7fffffffffffull))
15#else // LUAJIT_FLAVOR() 15#else // LUAJIT_FLAVOR()
16#define MAKE_UNIQUE_KEY( p_) ((void*)(ptrdiff_t)(p_)) 16#define MAKE_UNIQUE_KEY( p_) ((void*)(uintptr_t)(p_))
17#endif // LUAJIT_FLAVOR() 17#endif // LUAJIT_FLAVOR()
18 18
19#define DECLARE_UNIQUE_KEY( name_) UniqueKey name_ 19#define DECLARE_UNIQUE_KEY( name_) UniqueKey name_