void PushInstance(UProperty* prop, void* data) { LuaTArrayUD* ud = new LuaTArrayUD(prop, data); CLuaObject* metaT = g_Lua->GetMetaTable(MetaName); g_Lua->PushUserData(metaT, ud, MetaID); metaT->UnReference(); }
void Register() { CLuaObject* metaT = g_Lua->GetMetaTable(MetaName); metaT->SetMember("__index", index); metaT->SetMember("__tostring", tostring); metaT->SetMember("__gc", gc); metaT->UnReference(); }