aboutsummaryrefslogtreecommitdiff
path: root/src/macros_and_utils.h
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2022-03-09 14:11:21 +0100
committerBenoit Germain <bnt.germain@gmail.com>2022-03-09 14:11:21 +0100
commit49ef9d50d475921aab0c50b13b857f8cb990fcc0 (patch)
tree0b5e4deefd63481e99557dd326352a4bb8cb5dc0 /src/macros_and_utils.h
parentfe44f7e83fc0b3264533caaa3085938d78c3750b (diff)
downloadlanes-49ef9d50d475921aab0c50b13b857f8cb990fcc0.tar.gz
lanes-49ef9d50d475921aab0c50b13b857f8cb990fcc0.tar.bz2
lanes-49ef9d50d475921aab0c50b13b857f8cb990fcc0.zip
moonjit support
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r--src/macros_and_utils.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h
index e8e725b..3ed234a 100644
--- a/src/macros_and_utils.h
+++ b/src/macros_and_utils.h
@@ -12,19 +12,19 @@
12#define inline __inline 12#define inline __inline
13#endif 13#endif
14 14
15#define USE_DEBUG_SPEW 0 15#define USE_DEBUG_SPEW() 0
16#if USE_DEBUG_SPEW 16#if USE_DEBUG_SPEW()
17extern char const* debugspew_indent; 17extern char const* debugspew_indent;
18#define INDENT_BEGIN "%.*s " 18#define INDENT_BEGIN "%.*s "
19#define INDENT_END , (U ? U->debugspew_indent_depth : 0), debugspew_indent 19#define INDENT_END , (U ? U->debugspew_indent_depth : 0), debugspew_indent
20#define DEBUGSPEW_CODE(_code) _code 20#define DEBUGSPEW_CODE(_code) _code
21#define DEBUGSPEW_PARAM_COMMA( param_) param_, 21#define DEBUGSPEW_PARAM_COMMA( param_) param_,
22#define DEBUGSPEW_COMMA_PARAM( param_) , param_ 22#define DEBUGSPEW_COMMA_PARAM( param_) , param_
23#else // USE_DEBUG_SPEW 23#else // USE_DEBUG_SPEW()
24#define DEBUGSPEW_CODE(_code) 24#define DEBUGSPEW_CODE(_code)
25#define DEBUGSPEW_PARAM_COMMA( param_) 25#define DEBUGSPEW_PARAM_COMMA( param_)
26#define DEBUGSPEW_COMMA_PARAM( param_) 26#define DEBUGSPEW_COMMA_PARAM( param_)
27#endif // USE_DEBUG_SPEW 27#endif // USE_DEBUG_SPEW()
28 28
29#ifdef NDEBUG 29#ifdef NDEBUG
30 30
@@ -99,17 +99,7 @@ extern char const* debugspew_indent;
99 99
100#define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L) 100#define LUAG_FUNC( func_name) int LG_##func_name( lua_State* L)
101 101
102#if defined(LUA_JITLIBNAME)
103#if (defined(__x86_64__) || defined(_M_X64) || defined(__LP64__))
104#define LUAJIT_FLAVOR 64
105#else // 64 bits
106#define LUAJIT_FLAVOR 32
107#endif // 64 bits
108#else // LUA_JITLIBNAME
109#define LUAJIT_FLAVOR 0
110#endif // LUA_JITLIBNAME
111
112// after all, it looks like we can use the state allocator for our own usage when running LuaJIT, as long as we mutex-protect it 102// after all, it looks like we can use the state allocator for our own usage when running LuaJIT, as long as we mutex-protect it
113#define USE_LUA_STATE_ALLOCATOR 1 // (LUAJIT_FLAVOR==0) 103#define USE_LUA_STATE_ALLOCATOR() 1 // (LUAJIT_FLAVOR()==0)
114 104
115#endif // MACROS_AND_UTILS_H 105#endif // MACROS_AND_UTILS_H