aboutsummaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools.h b/src/tools.h
index e984ec2..19dca70 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -41,6 +41,17 @@ void luaL_requiref (lua_State* L, const char* modname, lua_CFunction openf, int
41#define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0) 41#define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0)
42#endif // LUA_VERSION_NUM == 502 42#endif // LUA_VERSION_NUM == 502
43 43
44// For some reason, LuaJIT 64bits doesn't support lua_newstate()
45// If you build specifically for this situation, change value to 0
46#define PROPAGATE_ALLOCF 1
47#if PROPAGATE_ALLOCF
48#define PROPAGATE_ALLOCF_PREP( L) void* allocUD; lua_Alloc allocF = lua_getallocf( L, &allocUD)
49#define PROPAGATE_ALLOCF_ALLOC() lua_newstate( allocF, allocUD)
50#else // PROPAGATE_ALLOCF
51#define PROPAGATE_ALLOCF_PREP( L)
52#define PROPAGATE_ALLOCF_ALLOC() luaL_newstate()
53#endif // PROPAGATE_ALLOCF
54
44#define USE_DEBUG_SPEW 0 55#define USE_DEBUG_SPEW 0
45#if USE_DEBUG_SPEW 56#if USE_DEBUG_SPEW
46extern char const* debugspew_indent; 57extern char const* debugspew_indent;