Skip to content

Commit c3f1b2e

Browse files
committed
修复lua55的问题
1 parent 973fd8a commit c3f1b2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

binding/lua_thread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ namespace bee::lua_thread {
6969
static int thread_luamain(lua_State* L) {
7070
lua_pushboolean(L, 1);
7171
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
72+
#if LUA_VERSION_NUM >= 505
73+
luaL_openselectedlibs(L, ~0, 0);
74+
#else
7275
luaL_openlibs(L);
76+
#endif
7377
thread_args* args = lua::tolightud<thread_args*>(L, 1);
7478
lua_pushinteger(L, args->id);
7579
lua_rawsetp(L, LUA_REGISTRYINDEX, &THREADID);

0 commit comments

Comments
 (0)