Browse Source

Improves the LuaJIT performance by using luaL_openlibs to initialize the VM (#26)

* Improves the LuaJIT performance by using luaL_openlibs to initialize the VM

* Revert "Improves the LuaJIT performance by using luaL_openlibs to initialize the VM"

This reverts commit 1e8f89a8fa.

* Loads the JIT library that way the JIT engine is enabled

* Fixes typo in comment
tags/v1.3.0
Leonardo Laguna Ruiz GitHub 5 years ago
parent
commit
acc8d7ea7f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/LuaJITEngine.cpp

+ 5
- 0
src/LuaJITEngine.cpp View File

@@ -34,6 +34,11 @@ struct LuaJITEngine : ScriptEngine {
luaopen_table(L); luaopen_table(L);
luaopen_math(L); luaopen_math(L);
luaopen_bit(L); luaopen_bit(L);
// Loads the JIT package otherwise it will be off
luaopen_jit(L);
// Disables access to the JIT package
lua_pushnil(L);
lua_setglobal(L,"jit");


// Set user pointer // Set user pointer
lua_pushlightuserdata(L, this); lua_pushlightuserdata(L, this);


Loading…
Cancel
Save