From f5e72dd12fc47f082a4f6d14090391410aa8a9f1 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 6 Aug 2018 21:50:55 +0800 Subject: *update --- src/lua/thread/luaopen_Thread.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lua/thread') 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; } -- cgit v1.1-26-g67d0