aboutsummaryrefslogtreecommitdiff
path: root/src/macros_and_utils.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/macros_and_utils.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h
index acbe690..e40a615 100644
--- a/src/macros_and_utils.h
+++ b/src/macros_and_utils.h
@@ -12,25 +12,7 @@
12#define inline __inline 12#define inline __inline
13#endif 13#endif
14 14
15 // For some reason, LuaJIT 64bits doesn't support lua_newstate() 15 #define USE_DEBUG_SPEW 0
16#ifndef PROPAGATE_ALLOCF //you should #define PROPAGATE_ALLOCF 1 for LuaJIT in GC64 mode
17#if defined(LUA_JITLIBNAME) && (defined(__x86_64__) || defined(_M_X64))
18 //#pragma message( "LuaJIT 64 bits detected: don't propagate allocf")
19#define PROPAGATE_ALLOCF 0
20#else // LuaJIT x64
21 //#pragma message( "PUC-Lua detected: propagate allocf")
22#define PROPAGATE_ALLOCF 1
23#endif // LuaJIT x64
24#endif // PROPAGATE_ALLOCF defined
25#if PROPAGATE_ALLOCF
26#define PROPAGATE_ALLOCF_PREP( L) void* allocUD; lua_Alloc allocF = lua_getallocf( L, &allocUD)
27#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD)
28#else // PROPAGATE_ALLOCF
29#define PROPAGATE_ALLOCF_PREP( L)
30#define PROPAGATE_ALLOCF_ALLOC() luaL_newstate()
31#endif // PROPAGATE_ALLOCF
32
33#define USE_DEBUG_SPEW 0
34#if USE_DEBUG_SPEW 16#if USE_DEBUG_SPEW
35extern char const* debugspew_indent; 17extern char const* debugspew_indent;
36#define INDENT_BEGIN "%.*s " 18#define INDENT_BEGIN "%.*s "