mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Merge pnUtRef with hsRefCnt, and remove the former
This commit is contained in:
@ -1695,7 +1695,7 @@ void cyAvatar::ChangeAvatar(const char* genderName)
|
||||
if (rvnPlr) {
|
||||
VaultPlayerNode plr(rvnPlr);
|
||||
plr.SetAvatarShapeName(wStr);
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -1716,7 +1716,7 @@ void cyAvatar::ChangePlayerName(const char* playerName)
|
||||
if (rvnPlr) {
|
||||
VaultPlayerNode plr(rvnPlr);
|
||||
plr.SetPlayerName(wStr);
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2474,7 +2474,7 @@ int cyMisc::GetKILevel()
|
||||
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wStr)) {
|
||||
VaultChronicleNode chron(rvn);
|
||||
result = wcstol(chron.GetEntryValue(), nil, 0);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -2893,7 +2893,7 @@ void cyMisc::SendFriendInvite(const wchar_t email[], const wchar_t toName[])
|
||||
}
|
||||
|
||||
NetCommSendFriendInvite(email, toName, inviteUuid);
|
||||
pNode->DecRef();
|
||||
pNode->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2082,7 +2082,7 @@ bool plPythonFileMod::MsgReceive(plMessage* msg)
|
||||
Py_DECREF(ptuple);
|
||||
ptuple = PyTuple_New(1);
|
||||
PyTuple_SetItem(ptuple, 0, pyVaultAgeLinkNode::New(rvn));
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -84,7 +84,7 @@ PyObject* pyAgeVault::GetAgeInfo()
|
||||
RelVaultNode * rvn = VaultGetAgeInfoNodeIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultAgeInfoNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ PyObject* pyAgeVault::GetAgeDevicesFolder( void )
|
||||
RelVaultNode * rvn = VaultGetAgeDevicesFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ PyObject* pyAgeVault::GetSubAgesFolder( void )
|
||||
RelVaultNode * rvn = VaultGetAgeSubAgesFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ PyObject* pyAgeVault::GetChronicleFolder( void )
|
||||
RelVaultNode * rvn = VaultGetAgeChronicleFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ PyObject* pyAgeVault::GetBookshelfFolder ( void )
|
||||
RelVaultNode * rvn = VaultAgeGetBookshelfFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ PyObject* pyAgeVault::GetPeopleIKnowAboutFolder( void )
|
||||
RelVaultNode * rvn = VaultGetAgePeopleIKnowAboutFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ PyObject* pyAgeVault::GetPublicAgesFolder(void)
|
||||
RelVaultNode * rvn = VaultGetAgePublicAgesFolderIncRef();
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ PyObject* pyAgeVault::GetSubAgeLink( const pyAgeInfoStruct & info )
|
||||
RelVaultNode * rvn = VaultFindAgeSubAgeLinkIncRef(info.GetAgeInfo());
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ plUUID pyAgeVault::GetAgeGuid( void )
|
||||
if (rvn) {
|
||||
VaultAgeInfoNode ageInfo(rvn);
|
||||
plUUID uuid = ageInfo.GetAgeInstanceGuid();
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return uuid;
|
||||
}
|
||||
return kNilUuid;
|
||||
@ -206,7 +206,7 @@ PyObject* pyAgeVault::FindChronicleEntry( const char * entryName )
|
||||
|
||||
if (RelVaultNode * rvn = VaultFindAgeChronicleEntryIncRef(wEntryName)) {
|
||||
PyObject * result = pyVaultChronicleNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ void pyAgeVault::AddDevice( const char * deviceName, PyObject * cbObject, uint32
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeAddDeviceAndWaitIncRef(wStr)) {
|
||||
cb->SetNode(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
cb->VaultOperationComplete( cbContext, cb->GetNode() ? hsOK : hsFail); // cbHolder deletes itself here.
|
||||
@ -268,7 +268,7 @@ PyObject * pyAgeVault::GetDevice( const char * deviceName )
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeGetDeviceIncRef(wStr)) {
|
||||
PyObject * result = pyVaultTextNoteNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ void pyAgeVault::SetDeviceInbox( const char * deviceName, const char * inboxName
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeSetDeviceInboxAndWaitIncRef(wDev, wInb)) {
|
||||
cb->SetNode(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
cb->VaultOperationComplete( cbContext, cb->GetNode() ? hsOK : hsFail ); // cbHolder deletes itself here.
|
||||
@ -301,7 +301,7 @@ PyObject * pyAgeVault::GetDeviceInbox( const char * deviceName )
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeGetDeviceInboxIncRef(wStr)) {
|
||||
PyObject * result = pyVaultTextNoteNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -333,10 +333,10 @@ PyObject* pyAgeVault::FindNode( pyVaultNode* templateNode ) const
|
||||
{
|
||||
if (RelVaultNode * rvn = VaultGetAgeNodeIncRef()) {
|
||||
RelVaultNode * find = rvn->GetChildNodeIncRef(templateNode->fNode, 1);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
if (find) {
|
||||
PyObject * result = pyVaultNode::New(find);
|
||||
find->DecRef();
|
||||
find->UnRef();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ uint32_t pyDniInfoSource::GetAgeTime( void ) const
|
||||
result = (uint32_t)utime->GetSecs();
|
||||
else
|
||||
result = 0;
|
||||
node->DecRef();
|
||||
node->UnRef();
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -95,7 +95,7 @@ const char * pyDniInfoSource::GetAgeName( void ) const
|
||||
VaultAgeInfoNode ageInfo(node);
|
||||
|
||||
fAgeName = StrDupToAnsi(ageInfo.GetAgeInstanceName());
|
||||
node->DecRef();
|
||||
node->UnRef();
|
||||
|
||||
return fAgeName;
|
||||
}
|
||||
@ -106,7 +106,7 @@ plUUID pyDniInfoSource::GetAgeGuid( void ) const
|
||||
{
|
||||
VaultAgeInfoNode ageInfo(node);
|
||||
plUUID uuid = ageInfo.GetAgeInstanceGuid();
|
||||
node->DecRef();
|
||||
node->UnRef();
|
||||
|
||||
return uuid;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void pyGameScore::CreateAgeScore(const plString& name, uint32_t type, int32_t po
|
||||
{
|
||||
uint32_t ownerId = ageInfo->GetNodeId();
|
||||
pfGameScore::Create(ownerId, name, type, points, rcvr.getKey());
|
||||
ageInfo->DecRef();
|
||||
ageInfo->UnRef();
|
||||
} else
|
||||
hsAssert(false, "Age has no vault... Need to rewrite score python script?");
|
||||
}
|
||||
@ -145,7 +145,7 @@ void pyGameScore::CreatePlayerScore(const plString& name, uint32_t type, int32_t
|
||||
{
|
||||
uint32_t ownerId = node->GetNodeId();
|
||||
pfGameScore::Create(ownerId, name, type, points, rcvr.getKey());
|
||||
node->DecRef();
|
||||
node->UnRef();
|
||||
} else
|
||||
hsAssert(false, "No PlayerInfo node... Need to rewrite python script?");
|
||||
}
|
||||
@ -161,7 +161,7 @@ void pyGameScore::FindAgeScores(const plString& name, pyKey& rcvr)
|
||||
{
|
||||
uint32_t ownerId = ageInfo->GetNodeId();
|
||||
pfGameScore::Find(ownerId, name, rcvr.getKey());
|
||||
ageInfo->DecRef();
|
||||
ageInfo->UnRef();
|
||||
} else
|
||||
hsAssert(false, "Age has no vault... Need to rewrite score python script?");
|
||||
}
|
||||
@ -177,7 +177,7 @@ void pyGameScore::FindPlayerScores(const plString& name, pyKey& rcvr)
|
||||
{
|
||||
uint32_t ownerId = node->GetNodeId();
|
||||
pfGameScore::Find(ownerId, name, rcvr.getKey());
|
||||
node->DecRef();
|
||||
node->UnRef();
|
||||
}
|
||||
else
|
||||
hsAssert(false, "No PlayerInfo node.. Need to rewrite python script?");
|
||||
|
@ -84,9 +84,9 @@ static PyObject * GetFolder (unsigned folderType) {
|
||||
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
|
||||
if (RelVaultNode * rvnFldr = rvnPlr->GetChildFolderNodeIncRef(folderType, 1)) {
|
||||
result = pyVaultFolderNode::New(rvnFldr);
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -98,9 +98,9 @@ static PyObject * GetPlayerInfoList (unsigned folderType) {
|
||||
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
|
||||
if (RelVaultNode * rvnFldr = rvnPlr->GetChildPlayerInfoListNodeIncRef(folderType, 1)) {
|
||||
result = pyVaultPlayerInfoListNode::New(rvnFldr);
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -112,9 +112,9 @@ static PyObject * GetAgeInfoList (unsigned folderType) {
|
||||
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
|
||||
if (RelVaultNode * rvnFldr = rvnPlr->GetChildAgeInfoListNodeIncRef(folderType, 1)) {
|
||||
result = pyVaultAgeInfoListNode::New(rvnFldr);
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -127,9 +127,9 @@ PyObject* pyVault::GetPlayerInfo()
|
||||
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
|
||||
if (RelVaultNode * rvnPlrInfo = rvnPlr->GetChildNodeIncRef(plVault::kNodeType_PlayerInfo, 1)) {
|
||||
result = pyVaultPlayerInfoNode::New(rvnPlrInfo);
|
||||
rvnPlrInfo->DecRef();
|
||||
rvnPlrInfo->UnRef();
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
|
||||
// just return an empty node
|
||||
@ -231,13 +231,13 @@ PyObject* pyVault::GetKIUsage(void)
|
||||
++notes;
|
||||
else if (rvn->GetNodeType() == plVault::kNodeType_MarkerGame)
|
||||
++markerGames;
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
rvnAgeJrnlz->DecRef();
|
||||
rvnAgeJrnlz->UnRef();
|
||||
break;
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ PyObject* pyVault::GetLinkToMyNeighborhood() const
|
||||
|
||||
if (RelVaultNode * rvn = VaultGetOwnedAgeLinkIncRef(&info)) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ PyObject* pyVault::GetLinkToCity() const
|
||||
|
||||
if (RelVaultNode * rvn = VaultGetOwnedAgeLinkIncRef(&info)) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -332,7 +332,7 @@ PyObject* pyVault::GetOwnedAgeLink( const pyAgeInfoStruct & info )
|
||||
{
|
||||
if (RelVaultNode * rvnLink = VaultGetOwnedAgeLinkIncRef(info.GetAgeInfo())) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvnLink);
|
||||
rvnLink->DecRef();
|
||||
rvnLink->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -345,7 +345,7 @@ PyObject* pyVault::GetVisitAgeLink( const pyAgeInfoStruct & info)
|
||||
{
|
||||
if (RelVaultNode * rvnLink = VaultGetVisitAgeLinkIncRef(info.GetAgeInfo())) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvnLink);
|
||||
rvnLink->DecRef();
|
||||
rvnLink->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ PyObject* pyVault::FindChronicleEntry( const char * entryName )
|
||||
|
||||
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wEntryName)) {
|
||||
PyObject * result = pyVaultChronicleNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ PyObject* pyVault::GetPsnlAgeSDL() const
|
||||
{
|
||||
PyObject * result = nil;
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
|
||||
if (RelVaultNode * rvnFldr = VaultGetAgesIOwnFolderIncRef()) {
|
||||
|
||||
@ -465,14 +465,14 @@ PyObject* pyVault::GetPsnlAgeSDL() const
|
||||
result = pySDLStateDataRecord::New(rec);
|
||||
else
|
||||
delete rec;
|
||||
rvnSdl->DecRef();
|
||||
rvnSdl->UnRef();
|
||||
}
|
||||
rvnInfo->DecRef();
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
|
||||
if (!result)
|
||||
PYTHON_RETURN_NONE;
|
||||
@ -487,7 +487,7 @@ void pyVault::UpdatePsnlAgeSDL( pySDLStateDataRecord & pyrec )
|
||||
return;
|
||||
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
|
||||
if (RelVaultNode * rvnFldr = VaultGetAgesIOwnFolderIncRef()) {
|
||||
|
||||
@ -506,14 +506,14 @@ void pyVault::UpdatePsnlAgeSDL( pySDLStateDataRecord & pyrec )
|
||||
if (RelVaultNode * rvnSdl = rvnInfo->GetChildNodeIncRef(templateNode, 1)) {
|
||||
VaultSDLNode sdl(rvnSdl);
|
||||
sdl.SetStateDataRecord(rec, plSDL::kDirtyOnly | plSDL::kTimeStampOnRead);
|
||||
rvnSdl->DecRef();
|
||||
rvnSdl->UnRef();
|
||||
}
|
||||
rvnInfo->DecRef();
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
bool pyVault::InMyPersonalAge() const
|
||||
@ -600,13 +600,13 @@ void _InvitePlayerToAge(ENetError result, void* state, void* param, RelVaultNode
|
||||
void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, uint32_t playerID )
|
||||
{
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_TextNote);
|
||||
VaultTextNoteNode visitAcc(templateNode);
|
||||
visitAcc.SetNoteType(plVault::kNoteType_Visit);
|
||||
visitAcc.SetVisitInfo(*link.GetAgeLink()->GetAgeInfo());
|
||||
VaultCreateNode(templateNode, (FVaultCreateNodeCallback)_InvitePlayerToAge, nil, (void*)playerID);
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -626,20 +626,20 @@ void pyVault::UnInvitePlayerToAge( const char * str, uint32_t playerID )
|
||||
if (RelVaultNode * rvnInfo = rvnLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||
VaultAgeInfoNode ageInfo(rvnInfo);
|
||||
ageInfo.CopyTo(&info);
|
||||
rvnInfo->DecRef();
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
|
||||
rvnLink->DecRef();
|
||||
rvnLink->UnRef();
|
||||
}
|
||||
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_TextNote);
|
||||
VaultTextNoteNode visitAcc(templateNode);
|
||||
visitAcc.SetNoteType(plVault::kNoteType_UnVisit);
|
||||
visitAcc.SetVisitInfo(info);
|
||||
VaultCreateNode(templateNode, (FVaultCreateNodeCallback)_UninvitePlayerToAge, nil, (void*)playerID);
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -699,7 +699,7 @@ PyObject* pyVault::GetGlobalInbox()
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvnGlobalInbox = VaultGetGlobalInboxIncRef()) {
|
||||
result = pyVaultFolderNode::New(rvnGlobalInbox);
|
||||
rvnGlobalInbox->DecRef();
|
||||
rvnGlobalInbox->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -714,7 +714,7 @@ PyObject* pyVault::FindNode( pyVaultNode* templateNode ) const
|
||||
// See if we already have a matching node locally
|
||||
if (RelVaultNode * rvn = VaultGetNodeIncRef(templateNode->GetNode())) {
|
||||
PyObject * result = pyVaultNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -728,7 +728,7 @@ PyObject* pyVault::FindNode( pyVaultNode* templateNode ) const
|
||||
// If we fetched it successfully then it'll be in our local node cache now
|
||||
if (RelVaultNode * rvn = VaultGetNodeIncRef(nodeIds[0])) {
|
||||
PyObject * result = pyVaultNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -112,10 +112,10 @@ PyObject *pyVaultAgeInfoListNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeInfoListNode *newObj = (ptVaultAgeInfoListNode*)ptVaultAgeInfoListNode_type.tp_new(&ptVaultAgeInfoListNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ static PyObject * GetChildFolder (RelVaultNode * node, unsigned type) {
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvn = node->GetChildFolderNodeIncRef(type, 1)) {
|
||||
result = pyVaultFolderNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -91,7 +91,7 @@ static PyObject * GetChildPlayerInfoList (RelVaultNode * node, unsigned type) {
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvn = node->GetChildPlayerInfoListNodeIncRef(type, 1)) {
|
||||
result = pyVaultPlayerInfoListNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -101,7 +101,7 @@ static PyObject * GetChildAgeInfoList (RelVaultNode * node, unsigned type) {
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvn = node->GetChildAgeInfoListNodeIncRef(type, 1)) {
|
||||
result = pyVaultAgeInfoListNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -175,7 +175,7 @@ PyObject * pyVaultAgeInfoNode::GetParentAgeLink () const
|
||||
|
||||
if (RelVaultNode * rvn = fNode->GetParentAgeLinkIncRef()) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -288,10 +288,10 @@ PyObject *pyVaultAgeInfoNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeInfoNode *newObj = (ptVaultAgeInfoNode*)ptVaultAgeInfoNode_type.tp_new(&ptVaultAgeInfoNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ PyObject* pyVaultAgeLinkNode::GetAgeInfo() const
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvn = fNode->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||
result = pyVaultAgeInfoNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
if (result)
|
||||
|
@ -201,10 +201,10 @@ PyObject *pyVaultAgeLinkNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeLinkNode *newObj = (ptVaultAgeLinkNode*)ptVaultAgeLinkNode_type.tp_new(&ptVaultAgeLinkNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -191,10 +191,10 @@ PyObject *pyVaultChronicleNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultChronicleNode *newObj = (ptVaultChronicleNode*)ptVaultChronicleNode_type.tp_new(&ptVaultChronicleNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -192,10 +192,10 @@ PyObject *pyVaultFolderNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultFolderNode *newObj = (ptVaultFolderNode*)ptVaultFolderNode_type.tp_new(&ptVaultFolderNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -220,10 +220,10 @@ PyObject *pyVaultImageNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultImageNode *newObj = (ptVaultImageNode*)ptVaultImageNode_type.tp_new(&ptVaultImageNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -115,10 +115,10 @@ PyObject *pyVaultMarkerGameNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultMarkerGameNode *newObj = (ptVaultMarkerGameNode*)ptVaultMarkerGameNode_type.tp_new(&ptVaultMarkerGameNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -159,10 +159,10 @@ void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationComplete( uint32_t
|
||||
|
||||
void pyVaultNode::pyVaultNodeOperationCallback::SetNode (RelVaultNode * rvn) {
|
||||
if (rvn)
|
||||
rvn->IncRef();
|
||||
rvn->Ref();
|
||||
SWAP(rvn, fNode);
|
||||
if (rvn)
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
RelVaultNode * pyVaultNode::pyVaultNodeOperationCallback::GetNode () {
|
||||
@ -182,13 +182,13 @@ pyVaultNode::pyVaultNode( RelVaultNode* nfsNode )
|
||||
, fCreateAgeName(nil)
|
||||
{
|
||||
if (fNode)
|
||||
fNode->IncRef("pyVaultNode");
|
||||
fNode->Ref("pyVaultNode");
|
||||
}
|
||||
|
||||
pyVaultNode::~pyVaultNode()
|
||||
{
|
||||
if (fNode)
|
||||
fNode->DecRef("pyVaultNode");
|
||||
fNode->UnRef("pyVaultNode");
|
||||
free(fCreateAgeName);
|
||||
}
|
||||
|
||||
@ -271,16 +271,16 @@ PyObject* pyVaultNode::GetCreatorNode( void )
|
||||
if (fNode)
|
||||
{
|
||||
RelVaultNode * templateNode = new RelVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode plrInfo(templateNode);
|
||||
plrInfo.SetPlayerId(fNode->GetCreatorId());
|
||||
|
||||
if (RelVaultNode * rvn = VaultGetNodeIncRef(templateNode)) {
|
||||
result = pyVaultPlayerInfoNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
if (result)
|
||||
@ -423,8 +423,8 @@ PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, uint32_t
|
||||
);
|
||||
|
||||
if (newNode) {
|
||||
newNode->IncRef();
|
||||
pynode->fNode->DecRef();
|
||||
newNode->Ref();
|
||||
pynode->fNode->UnRef();
|
||||
pynode->fNode = newNode;
|
||||
}
|
||||
else {
|
||||
@ -471,7 +471,7 @@ void pyVaultNode::LinkToNode(int nodeID, PyObject* cbObject, uint32_t cbContext)
|
||||
if (RelVaultNode * rvn = VaultGetNodeIncRef(nodeID)) {
|
||||
cb->SetNode(rvn);
|
||||
cb->fPyNodeRef = pyVaultNodeRef::New(fNode, rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
VaultAddChildNode(fNode->GetNodeId(),
|
||||
@ -536,7 +536,7 @@ void pyVaultNode::Save(PyObject* cbObject, uint32_t cbContext)
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (RelVaultNode * node = VaultCreateNodeAndWaitIncRef(fNode, &result)) {
|
||||
fNode->DecRef();
|
||||
fNode->UnRef();
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
@ -560,7 +560,7 @@ void pyVaultNode::ForceSave()
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (RelVaultNode * node = VaultCreateNodeAndWaitIncRef(fNode, &result)) {
|
||||
fNode->DecRef();
|
||||
fNode->UnRef();
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
@ -579,7 +579,7 @@ void pyVaultNode::SendTo(uint32_t destClientNodeID, PyObject* cbObject, uint32_t
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (RelVaultNode * node = VaultCreateNodeAndWaitIncRef(fNode, &result)) {
|
||||
fNode->DecRef();
|
||||
fNode->UnRef();
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
@ -618,7 +618,7 @@ PyObject* pyVaultNode::GetChildNodeRefList()
|
||||
PyObject* elementObj = pyVaultNodeRef::New(fNode, nodes[i]);
|
||||
PyList_Append(pyEL, elementObj);
|
||||
Py_DECREF(elementObj);
|
||||
nodes[i]->DecRef();
|
||||
nodes[i]->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
@ -657,13 +657,13 @@ PyObject * pyVaultNode::GetNode2( uint32_t nodeID ) const
|
||||
if ( fNode )
|
||||
{
|
||||
RelVaultNode * templateNode = new RelVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeId(nodeID);
|
||||
if (RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode, 1)) {
|
||||
result = pyVaultNodeRef::New(fNode, rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
if (result)
|
||||
@ -679,7 +679,7 @@ PyObject* pyVaultNode::FindNode( pyVaultNode * templateNode )
|
||||
{
|
||||
if (RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode->fNode, 1)) {
|
||||
result = pyVaultNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
@ -695,14 +695,14 @@ PyObject * pyVaultNode::GetChildNode (unsigned nodeId) {
|
||||
PYTHON_RETURN_NONE;
|
||||
|
||||
RelVaultNode * templateNode = new RelVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeId(nodeId);
|
||||
RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode, 1);
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
|
||||
if (rvn) {
|
||||
PyObject * result = pyVaultNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -542,10 +542,10 @@ PyObject *pyVaultNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultNode *newObj = (ptVaultNode*)ptVaultNode_type.tp_new(&ptVaultNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,8 @@ pyVaultNodeRef::pyVaultNodeRef(RelVaultNode * parent, RelVaultNode * child)
|
||||
: fParent(parent)
|
||||
, fChild(child)
|
||||
{
|
||||
fParent->IncRef();
|
||||
fChild->IncRef();
|
||||
fParent->Ref();
|
||||
fChild->Ref();
|
||||
}
|
||||
|
||||
pyVaultNodeRef::pyVaultNodeRef(int)
|
||||
@ -78,9 +78,9 @@ pyVaultNodeRef::pyVaultNodeRef(int)
|
||||
pyVaultNodeRef::~pyVaultNodeRef()
|
||||
{
|
||||
if (fParent)
|
||||
fParent->DecRef();
|
||||
fParent->UnRef();
|
||||
if (fChild)
|
||||
fChild->DecRef();
|
||||
fChild->UnRef();
|
||||
}
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ unsigned pyVaultNodeRef::GetSaverID () {
|
||||
unsigned saverId = 0;
|
||||
if (RelVaultNode * child = VaultGetNodeIncRef(fChild->GetNodeId())) {
|
||||
saverId = child->GetRefOwnerId(fParent->GetNodeId());
|
||||
child->DecRef();
|
||||
child->UnRef();
|
||||
}
|
||||
return saverId;
|
||||
}
|
||||
@ -129,7 +129,7 @@ PyObject * pyVaultNodeRef::GetSaver () {
|
||||
if (unsigned saverId = child->GetRefOwnerId(fParent->GetNodeId())) {
|
||||
// Find the player info node representing the saver
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(saverId);
|
||||
@ -144,15 +144,15 @@ PyObject * pyVaultNodeRef::GetSaver () {
|
||||
}
|
||||
}
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
child->DecRef();
|
||||
child->UnRef();
|
||||
}
|
||||
if (!saver)
|
||||
PYTHON_RETURN_NONE;
|
||||
|
||||
PyObject * result = pyVaultPlayerInfoNode::New(saver);
|
||||
saver->DecRef();
|
||||
saver->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -126,15 +126,15 @@ PyObject *pyVaultNodeRef::New(RelVaultNode * parent, RelVaultNode * child)
|
||||
{
|
||||
ptVaultNodeRef *newObj = (ptVaultNodeRef*)ptVaultNodeRef_type.tp_new(&ptVaultNodeRef_type, NULL, NULL);
|
||||
if (newObj->fThis->fParent)
|
||||
newObj->fThis->fParent->DecRef();
|
||||
newObj->fThis->fParent->UnRef();
|
||||
if (newObj->fThis->fChild)
|
||||
newObj->fThis->fChild->DecRef();
|
||||
newObj->fThis->fChild->UnRef();
|
||||
newObj->fThis->fParent = parent;
|
||||
newObj->fThis->fChild = child;
|
||||
if (newObj->fThis->fParent)
|
||||
newObj->fThis->fParent->IncRef();
|
||||
newObj->fThis->fParent->Ref();
|
||||
if (newObj->fThis->fChild)
|
||||
newObj->fThis->fChild->IncRef();
|
||||
newObj->fThis->fChild->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -80,16 +80,16 @@ bool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID )
|
||||
return false;
|
||||
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(playerID);
|
||||
|
||||
RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode, 1);
|
||||
if (rvn)
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
return (rvn != nil);
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ static void IAddPlayer_NodesFound(ENetError result, void* param, unsigned nodeId
|
||||
NetVaultNode* parent = static_cast<NetVaultNode*>(param);
|
||||
if (nodeIdCount)
|
||||
VaultAddChildNode(parent->GetNodeId(), nodeIds[0], VaultGetPlayerId(), nullptr, nullptr);
|
||||
parent->DecRef();
|
||||
parent->UnRef();
|
||||
}
|
||||
|
||||
void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
@ -109,7 +109,7 @@ void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
return;
|
||||
|
||||
NetVaultNode* templateNode = new NetVaultNode();
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(playerID);
|
||||
@ -121,7 +121,7 @@ void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
if (nodeIds.Count())
|
||||
VaultAddChildNode(fNode->GetNodeId(), nodeIds[0], VaultGetPlayerId(), nullptr, nullptr);
|
||||
else {
|
||||
fNode->IncRef();
|
||||
fNode->Ref();
|
||||
VaultFindNodes(templateNode, IAddPlayer_NodesFound, fNode);
|
||||
}
|
||||
}
|
||||
@ -132,17 +132,17 @@ void pyVaultPlayerInfoListNode::RemovePlayer( uint32_t playerID )
|
||||
return;
|
||||
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(playerID);
|
||||
|
||||
if (RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode, 1)) {
|
||||
VaultRemoveChildNode(fNode->GetNodeId(), rvn->GetNodeId(), nil, nil);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
}
|
||||
|
||||
PyObject * pyVaultPlayerInfoListNode::GetPlayer( uint32_t playerID )
|
||||
@ -151,7 +151,7 @@ PyObject * pyVaultPlayerInfoListNode::GetPlayer( uint32_t playerID )
|
||||
PYTHON_RETURN_NONE;
|
||||
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->IncRef();
|
||||
templateNode->Ref();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(playerID);
|
||||
@ -159,10 +159,10 @@ PyObject * pyVaultPlayerInfoListNode::GetPlayer( uint32_t playerID )
|
||||
PyObject * result = nil;
|
||||
if (RelVaultNode * rvn = fNode->GetChildNodeIncRef(templateNode, 1)) {
|
||||
result = pyVaultPlayerInfoNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
templateNode->DecRef();
|
||||
templateNode->UnRef();
|
||||
|
||||
if (!result)
|
||||
PYTHON_RETURN_NONE;
|
||||
|
@ -180,10 +180,10 @@ PyObject *pyVaultPlayerInfoListNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerInfoListNode *newObj = (ptVaultPlayerInfoListNode*)ptVaultPlayerInfoListNode_type.tp_new(&ptVaultPlayerInfoListNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -172,10 +172,10 @@ PyObject *pyVaultPlayerInfoNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerInfoNode *newObj = (ptVaultPlayerInfoNode*)ptVaultPlayerInfoNode_type.tp_new(&ptVaultPlayerInfoNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -68,9 +68,9 @@ static PyObject * GetPlayerVaultFolder (unsigned folderType) {
|
||||
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
|
||||
if (RelVaultNode * rvnFldr = rvnPlr->GetChildFolderNodeIncRef(folderType, 1)) {
|
||||
result = pyVaultFolderNode::New(rvnFldr);
|
||||
rvnFldr->DecRef();
|
||||
rvnFldr->UnRef();
|
||||
}
|
||||
rvnPlr->DecRef();
|
||||
rvnPlr->UnRef();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -174,7 +174,7 @@ PyObject *pyVaultPlayerNode::GetPlayerInfo()
|
||||
{
|
||||
if (RelVaultNode * rvn = VaultGetPlayerInfoNodeIncRef()) {
|
||||
PyObject * result = pyVaultPlayerInfoNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ PyObject *pyVaultPlayerNode::GetVisitAgeLink(const pyAgeInfoStruct *info)
|
||||
{
|
||||
if (RelVaultNode * rvn = VaultGetVisitAgeLinkIncRef(info->GetAgeInfo())) {
|
||||
PyObject * result = pyVaultAgeLinkNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ PyObject *pyVaultPlayerNode::FindChronicleEntry(const char *entryName)
|
||||
StrToUnicode(wStr, entryName, arrsize(wStr));
|
||||
if (RelVaultNode * rvn = VaultFindChronicleEntryIncRef(wStr)) {
|
||||
PyObject * result = pyVaultChronicleNode::New(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -322,10 +322,10 @@ PyObject *pyVaultPlayerNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerNode *newObj = (ptVaultPlayerNode*)ptVaultPlayerNode_type.tp_new(&ptVaultPlayerNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -130,10 +130,10 @@ PyObject *pyVaultSDLNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultSDLNode *newObj = (ptVaultSDLNode*)ptVaultSDLNode_type.tp_new(&ptVaultSDLNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -71,10 +71,10 @@ PyObject *pyVaultSystemNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultSystemNode *newObj = (ptVaultSystemNode*)ptVaultSystemNode_type.tp_new(&ptVaultSystemNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ void pyVaultTextNoteNode::SetDeviceInbox( const char * devName, PyObject * cbObj
|
||||
|
||||
if (RelVaultNode * rvn = VaultAgeSetDeviceInboxAndWaitIncRef(wDev, DEFAULT_DEVICE_INBOX)) {
|
||||
cb->SetNode(rvn);
|
||||
rvn->DecRef();
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
cb->VaultOperationComplete( cbContext, cb->GetNode() ? hsOK : hsFail ); // cbHolder deletes itself here.
|
||||
|
@ -319,10 +319,10 @@ PyObject *pyVaultTextNoteNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultTextNoteNode *newObj = (ptVaultTextNoteNode*)ptVaultTextNoteNode_type.tp_new(&ptVaultTextNoteNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->DecRef();
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->IncRef();
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user