aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/thread/je_lua_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/thread/je_lua_thread.cpp')
-rw-r--r--src/lua/modules/thread/je_lua_thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/modules/thread/je_lua_thread.cpp b/src/lua/modules/thread/je_lua_thread.cpp
index 2444e7b..4e0442e 100644
--- a/src/lua/modules/thread/je_lua_thread.cpp
+++ b/src/lua/modules/thread/je_lua_thread.cpp
@@ -27,7 +27,7 @@ namespace JinEngine
SharedThread shared = *(Shared<Thread>*)t;
lua_State* L = lua_open();
luax_openlibs(L);
- luaopen_jin(L);
+ open(L);
luax_getglobal(L, MODULE_NAME);
Proxy* proxy = luax_newinstance(L, Jin_Lua_Thread, &shared);
luax_setfield(L, -2, "_curThread");
@@ -215,7 +215,7 @@ namespace JinEngine
const char* name = luax_checkstring(L, 1);
const char* code = luax_checkstring(L, 2);
Thread* thread = new Thread(name, code, threadRunner);
- Proxy* proxy = luax_newinstance(L, Jin_Lua_Thread, new Shared<Thread>(thread, Jin_Lua_Thread));
+ Proxy* proxy = luax_newinstance(L, Jin_Lua_Thread, new Shared<Thread>(L, thread, Jin_Lua_Thread));
return 1;
}