From a5061a888c434d3ba40e57d390717f234ee6a1f9 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 14 Feb 2024 14:28:25 +0300 Subject: [PATCH] lua: added bit library --- src/logic/scripting/LuaState.cpp | 7 +++---- src/logic/scripting/LuaState.h | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/logic/scripting/LuaState.cpp b/src/logic/scripting/LuaState.cpp index 7a81e237..9596356b 100644 --- a/src/logic/scripting/LuaState.cpp +++ b/src/logic/scripting/LuaState.cpp @@ -20,12 +20,11 @@ lua::LuaState::LuaState() { luaopen_string(L); luaopen_table(L); luaopen_debug(L); + luaopen_jit(L); + luaopen_bit(L); std::cout << LUA_VERSION << std::endl; -# ifdef LUAJIT_VERSION - luaopen_jit(L); - std::cout << LUAJIT_VERSION << std::endl; -# endif // LUAJIT_VERSION + std::cout << LUAJIT_VERSION << std::endl; createFuncs(); diff --git a/src/logic/scripting/LuaState.h b/src/logic/scripting/LuaState.h index 6d606c5e..36cb7315 100644 --- a/src/logic/scripting/LuaState.h +++ b/src/logic/scripting/LuaState.h @@ -5,6 +5,10 @@ #include #include +#ifndef LUAJIT_VERSION +#error LuaJIT required +#endif + namespace lua { using luaint = lua_Integer; using luanumber = lua_Number;