mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Added FFI enabled check
This commit is contained in:
parent
f92c28b1b5
commit
f5355395b7
|
@ -70,6 +70,14 @@
|
|||
#define SOL_LUAJIT_VERSION_I_ 0
|
||||
#endif
|
||||
|
||||
#if defined(SOL_LUAJIT_FFI_DISABLED)
|
||||
#define SOL_LUAJIT_FFI_DISABLED_I_ SOL_ON
|
||||
#elif defined(LUAJIT_DISABLE_FFI)
|
||||
#define SOL_LUAJIT_FFI_DISABLED_I_ SOL_ON
|
||||
#else
|
||||
#define SOL_LUAJIT_FFI_DISABLED_I_ SOL_DEFAULT_OFF
|
||||
#endif
|
||||
|
||||
#if defined(MOONJIT_VERSION)
|
||||
#define SOL_USE_MOONJIT_I_ SOL_ON
|
||||
#else
|
||||
|
|
|
@ -189,7 +189,7 @@ namespace sol {
|
|||
#endif // Lua 5.3+ only
|
||||
break;
|
||||
case lib::ffi:
|
||||
#if SOL_IS_ON(SOL_USE_LUAJIT_I_)
|
||||
#if SOL_IS_ON(SOL_USE_LUAJIT_I_) && SOL_IS_OFF(SOL_LUAJIT_FFI_DISABLED_I_)
|
||||
luaL_requiref(L, "ffi", luaopen_ffi, 1);
|
||||
lua_pop(L, 1);
|
||||
#endif // LuaJIT only
|
||||
|
|
Loading…
Reference in New Issue
Block a user