aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools.h b/src/tools.h
index 8e8bb7d..b868440 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -17,8 +17,11 @@
17#endif 17#endif
18 18
19// For some reason, LuaJIT 64bits doesn't support lua_newstate() 19// For some reason, LuaJIT 64bits doesn't support lua_newstate()
20// If you build specifically for this situation, change value to 0 20#if defined(LUA_LJDIR) && (defined(__x86_64__) || defined(_M_X64))
21#define PROPAGATE_ALLOCF 0
22#else // LuaJIT x64
21#define PROPAGATE_ALLOCF 1 23#define PROPAGATE_ALLOCF 1
24#endif // LuaJIT x64
22#if PROPAGATE_ALLOCF 25#if PROPAGATE_ALLOCF
23#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)
24#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD) 27#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD)