aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/thread/je_lua_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/thread/je_lua_thread.cpp')
-rw-r--r--src/lua/modules/thread/je_lua_thread.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lua/modules/thread/je_lua_thread.cpp b/src/lua/modules/thread/je_lua_thread.cpp
index eea7e24..d99161f 100644
--- a/src/lua/modules/thread/je_lua_thread.cpp
+++ b/src/lua/modules/thread/je_lua_thread.cpp
@@ -80,14 +80,14 @@ namespace JinEngine
}
else if (luax_isuserdata(L, vp))
{
- void* p = luax_touserdata(L, vp);
- shared->send(slot, p);
- }
+ LuaObject* luaObj = (LuaObject*)luax_touserdata(L, vp);
+ shared->send(slot, luaObj);
+ }/*
else if (luax_islightuserdata(L, vp))
{
void* p = luax_tolightuserdata(L, vp);
shared->send(slot, p);
- }
+ }*/
return 0;
}
@@ -125,7 +125,8 @@ namespace JinEngine
case Thread::Variant::POINTER:
LuaObject* p = (LuaObject*)v.pointer;
- LuaObject* luaObj = luax_newinstance(L, p->getObjectType(), p->getSharedBase());
+ // Create lua object from other lua_State.
+ LuaObject* luaObj = luax_newinstance(L, p);
break;
}
@@ -157,8 +158,8 @@ namespace JinEngine
case Thread::Variant::POINTER:
LuaObject* p = (LuaObject*)v.pointer;
- const char* objType = p->getObjectType();
- LuaObject* luaObj = luax_newinstance(L, objType, p->getSharedBase());
+ // Create lua object from other lua_State.
+ LuaObject* luaObj = luax_newinstance(L, p->getObjectType(), p->getSharedBase());
break;
}