aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/macros_and_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h
index 2a619b3..9d73d50 100644
--- a/src/macros_and_utils.h
+++ b/src/macros_and_utils.h
@@ -13,6 +13,7 @@
13#endif 13#endif
14 14
15 // For some reason, LuaJIT 64bits doesn't support lua_newstate() 15 // For some reason, LuaJIT 64bits doesn't support lua_newstate()
16#ifndef PROPAGATE_ALLOCF //you should #define PROPAGATE_ALLOCF 1 for LuaJIT in GC64 mode
16#if defined(LUA_JITLIBNAME) && (defined(__x86_64__) || defined(_M_X64)) 17#if defined(LUA_JITLIBNAME) && (defined(__x86_64__) || defined(_M_X64))
17 //#pragma message( "LuaJIT 64 bits detected: don't propagate allocf") 18 //#pragma message( "LuaJIT 64 bits detected: don't propagate allocf")
18#define PROPAGATE_ALLOCF 0 19#define PROPAGATE_ALLOCF 0
@@ -20,6 +21,7 @@
20 //#pragma message( "PUC-Lua detected: propagate allocf") 21 //#pragma message( "PUC-Lua detected: propagate allocf")
21#define PROPAGATE_ALLOCF 1 22#define PROPAGATE_ALLOCF 1
22#endif // LuaJIT x64 23#endif // LuaJIT x64
24#endif // PROPAGATE_ALLOCF defined
23#if PROPAGATE_ALLOCF 25#if PROPAGATE_ALLOCF
24#define PROPAGATE_ALLOCF_PREP( L) void* allocUD; lua_Alloc allocF = lua_getallocf( L, &allocUD) 26#define PROPAGATE_ALLOCF_PREP( L) void* allocUD; lua_Alloc allocF = lua_getallocf( L, &allocUD)
25#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD) 27#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD)