aboutsummaryrefslogtreecommitdiff
path: root/src/lua/thread/luaopen_Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/thread/luaopen_Thread.cpp')
-rw-r--r--src/lua/thread/luaopen_Thread.cpp8
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;
}