From 95348ffaee8cbcc600bd7719712c41f2ff6833da Mon Sep 17 00:00:00 2001 From: Leonardo Laguna Ruiz Date: Sun, 12 Apr 2020 14:59:10 +0300 Subject: [PATCH] Loads the JIT library that way the JIT engine is enabled --- src/LuaJITEngine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LuaJITEngine.cpp b/src/LuaJITEngine.cpp index 1d8d523..099a062 100644 --- a/src/LuaJITEngine.cpp +++ b/src/LuaJITEngine.cpp @@ -34,6 +34,11 @@ struct LuaJITEngine : ScriptEngine { luaopen_table(L); luaopen_math(L); luaopen_bit(L); + // Loads the JIT package otherwise it will be off + luaopen_jit(L); + // Diables access to the JIT package + lua_pushnil(L); + lua_setglobal(L,"jit"); // Set user pointer lua_pushlightuserdata(L, this);