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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/thread/luaopen_Thread.cpp b/src/lua/thread/luaopen_Thread.cpp
index eaa263d..5d44c30 100644
--- a/src/lua/thread/luaopen_Thread.cpp
+++ b/src/lua/thread/luaopen_Thread.cpp
@@ -219,8 +219,7 @@ namespace lua
const char* code = luax_checkstring(L, 2);
Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_THREAD_THREAD, sizeof(Proxy));
Thread* thread = new Thread(name, code, threadRunner);
- Ref<Thread>* ref = new Ref<Thread>(thread);
- proxy->bind(ref, JIN_THREAD_THREAD);
+ proxy->bind(new Ref<Thread>(thread), JIN_THREAD_THREAD);
return 1;
}
@@ -232,8 +231,8 @@ namespace lua
}
static const luaL_Reg f[] = {
- { "Thread", l_newThread},
- { "getThread", l_getThread},
+ { "Thread", l_newThread },
+ { "getThread", l_getThread },
{ 0, 0 }
};