aboutsummaryrefslogtreecommitdiff
path: root/src/macros_and_utils.h
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2022-02-17 16:30:36 +0100
committerBenoit Germain <bnt.germain@gmail.com>2022-02-17 16:30:36 +0100
commitc2f88350772c01631ea3b7d60e56cea335c458b7 (patch)
treeb4fcc4bebb094190b0dc13561ab24c1593da86f7 /src/macros_and_utils.h
parent2c0000d5169cacf950d06637ada1a371cf382896 (diff)
downloadlanes-c2f88350772c01631ea3b7d60e56cea335c458b7.tar.gz
lanes-c2f88350772c01631ea3b7d60e56cea335c458b7.tar.bz2
lanes-c2f88350772c01631ea3b7d60e56cea335c458b7.zip
NEVER use allocator obtained from lua_getallocf to allocate stuff manually when compiling for LuaJIT
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r--src/macros_and_utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h
index b67a7c4..dac89d1 100644
--- a/src/macros_and_utils.h
+++ b/src/macros_and_utils.h
@@ -99,4 +99,14 @@ 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
102#endif // MACROS_AND_UTILS_H 112#endif // MACROS_AND_UTILS_H