aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/state.cpp b/src/state.cpp
index 83b9e85..08ed111 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -344,7 +344,7 @@ lua_State* luaG_newstate(Universe* U_, SourceState from_, char const* libs_)
344 // 'lua.c' stops GC during initialization so perhaps it is a good idea. :) 344 // 'lua.c' stops GC during initialization so perhaps it is a good idea. :)
345 lua_gc(_L, LUA_GCSTOP, 0); 345 lua_gc(_L, LUA_GCSTOP, 0);
346 346
347 // Anything causes 'base' to be taken in 347 // Anything causes 'base' and 'jit' to be taken in
348 if (libs_ != nullptr) { 348 if (libs_ != nullptr) {
349 // special "*" case (mainly to help with LuaJIT compatibility) 349 // special "*" case (mainly to help with LuaJIT compatibility)
350 // as we are called from luaopen_lanes_core() already, and that would deadlock 350 // as we are called from luaopen_lanes_core() already, and that would deadlock
@@ -355,6 +355,10 @@ lua_State* luaG_newstate(Universe* U_, SourceState from_, char const* libs_)
355 open1lib(DEBUGSPEW_PARAM_COMMA(U_) _L, kLanesCoreLibName); 355 open1lib(DEBUGSPEW_PARAM_COMMA(U_) _L, kLanesCoreLibName);
356 libs_ = nullptr; // done with libs 356 libs_ = nullptr; // done with libs
357 } else { 357 } else {
358#if LUAJIT_FLAVOR() != 0 // building against LuaJIT headers, always open jit
359 DEBUGSPEW_CODE(DebugSpew(U_) << "opening 'jit' library" << std::endl);
360 open1lib(DEBUGSPEW_PARAM_COMMA(U_) _L, LUA_JITLIBNAME);
361#endif // LUAJIT_FLAVOR()
358 DEBUGSPEW_CODE(DebugSpew(U_) << "opening 'base' library" << std::endl); 362 DEBUGSPEW_CODE(DebugSpew(U_) << "opening 'base' library" << std::endl);
359#if LUA_VERSION_NUM >= 502 363#if LUA_VERSION_NUM >= 502
360 // open base library the same way as in luaL_openlibs() 364 // open base library the same way as in luaL_openlibs()