From 8d4e45c9a85175d0fc37d7d5c49ff90abb01fe4f Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Nov 2018 12:24:22 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9lua=20bind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/modules/thread/je_lua_thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua/modules/thread/je_lua_thread.cpp') 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*)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, Jin_Lua_Thread)); + Proxy* proxy = luax_newinstance(L, Jin_Lua_Thread, new Shared(L, thread, Jin_Lua_Thread)); return 1; } -- cgit v1.1-26-g67d0