diff options
author | chai <chaifix@163.com> | 2018-08-06 21:50:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-06 21:50:55 +0800 |
commit | f5e72dd12fc47f082a4f6d14090391410aa8a9f1 (patch) | |
tree | d333605b5bfb651c336dcb60f27d99048cd8ff89 /src/lua/thread/luaopen_Thread.cpp | |
parent | 5bcb37a04383f6827aaea3aaf67ffc5e32e5f990 (diff) |
*update
Diffstat (limited to 'src/lua/thread/luaopen_Thread.cpp')
-rw-r--r-- | src/lua/thread/luaopen_Thread.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lua/thread/luaopen_Thread.cpp b/src/lua/thread/luaopen_Thread.cpp index f811bdf..c08c262 100644 --- a/src/lua/thread/luaopen_Thread.cpp +++ b/src/lua/thread/luaopen_Thread.cpp @@ -1,5 +1,6 @@ #include "lua/luax.h" #include "libjin/jin.h" +#include "../luaopen_jin.h" #include "../luaopen_types.h" namespace jin @@ -36,9 +37,8 @@ namespace jin Thread* thread = (Thread*)p; lua_State* L = lua_open(); luax_openlibs(L); - luaopen_thread(L); - luax_dostring(L, thread->code.c_str(), thread->code.length(),thread->name.c_str()); - + luaopen_jin(L); + luax_dostring(L, thread->code.c_str()); } static int l_gc(lua_State* L) @@ -117,6 +117,8 @@ namespace jin static int l_demand(lua_State* L) { + Thread* t = checkThread(L); + return 1; } |