aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/thread/je_lua_thread.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-23 12:24:22 +0800
committerchai <chaifix@163.com>2018-11-23 12:24:22 +0800
commit8d4e45c9a85175d0fc37d7d5c49ff90abb01fe4f (patch)
tree4ca2d0b34366293ad57d77c64e753c9013ccdc21 /src/lua/modules/thread/je_lua_thread.cpp
parentcfa05003be67344fbc79c338c2ac82f0accd979d (diff)
*修改lua bind
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;
}