mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Use hsRef for storage of the remaining vault nodes
This commit is contained in:
@ -554,14 +554,12 @@ void _InvitePlayerToAge(ENetError result, void* state, void* param, RelVaultNode
|
||||
|
||||
void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, uint32_t playerID )
|
||||
{
|
||||
NetVaultNode * templateNode = new NetVaultNode;
|
||||
templateNode->Ref();
|
||||
hsRef<NetVaultNode> templateNode = new NetVaultNode;
|
||||
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->UnRef();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -111,11 +111,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultAgeInfoListNode, pyVaultFolderNode, "Params: n=
|
||||
PyObject *pyVaultAgeInfoListNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeInfoListNode *newObj = (ptVaultAgeInfoListNode*)ptVaultAgeInfoListNode_type.tp_new(&ptVaultAgeInfoListNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -287,11 +287,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultAgeInfoNode, pyVaultNode, "Params: n=0\nPlasma
|
||||
PyObject *pyVaultAgeInfoNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeInfoNode *newObj = (ptVaultAgeInfoNode*)ptVaultAgeInfoNode_type.tp_new(&ptVaultAgeInfoNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -200,11 +200,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultAgeLinkNode, pyVaultNode, "Params: n=0\nPlasma
|
||||
PyObject *pyVaultAgeLinkNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultAgeLinkNode *newObj = (ptVaultAgeLinkNode*)ptVaultAgeLinkNode_type.tp_new(&ptVaultAgeLinkNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -190,11 +190,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultChronicleNode, pyVaultNode, "Params: n=0\nPlasm
|
||||
PyObject *pyVaultChronicleNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultChronicleNode *newObj = (ptVaultChronicleNode*)ptVaultChronicleNode_type.tp_new(&ptVaultChronicleNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -191,11 +191,7 @@ PYTHON_EXPOSE_TYPE_DEFINITION(ptVaultFolderNode, pyVaultFolderNode);
|
||||
PyObject *pyVaultFolderNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultFolderNode *newObj = (ptVaultFolderNode*)ptVaultFolderNode_type.tp_new(&ptVaultFolderNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -219,11 +219,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultImageNode, pyVaultNode, "Params: n=0\nPlasma va
|
||||
PyObject *pyVaultImageNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultImageNode *newObj = (ptVaultImageNode*)ptVaultImageNode_type.tp_new(&ptVaultImageNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -114,11 +114,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultMarkerGameNode, pyVaultNode, "Params: n=0\nPlas
|
||||
PyObject *pyVaultMarkerGameNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultMarkerGameNode *newObj = (ptVaultMarkerGameNode*)ptVaultMarkerGameNode_type.tp_new(&ptVaultMarkerGameNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,6 @@ static void CDECL LogDumpProc (
|
||||
|
||||
pyVaultNode::pyVaultNodeOperationCallback::pyVaultNodeOperationCallback(PyObject * cbObject)
|
||||
: fCbObject( cbObject )
|
||||
, fNode(nil)
|
||||
, fPyNodeRef(nil)
|
||||
, fContext(0)
|
||||
{
|
||||
@ -158,21 +157,16 @@ void pyVaultNode::pyVaultNodeOperationCallback::VaultOperationComplete( uint32_t
|
||||
}
|
||||
|
||||
void pyVaultNode::pyVaultNodeOperationCallback::SetNode (RelVaultNode * rvn) {
|
||||
if (rvn)
|
||||
rvn->Ref();
|
||||
SWAP(rvn, fNode);
|
||||
if (rvn)
|
||||
rvn->UnRef();
|
||||
fNode = rvn;
|
||||
}
|
||||
|
||||
RelVaultNode * pyVaultNode::pyVaultNodeOperationCallback::GetNode () {
|
||||
hsRef<RelVaultNode> pyVaultNode::pyVaultNodeOperationCallback::GetNode() const {
|
||||
return fNode;
|
||||
}
|
||||
|
||||
// only for python glue, do NOT call
|
||||
pyVaultNode::pyVaultNode()
|
||||
: fNode(nil)
|
||||
, fCreateAgeName(nil)
|
||||
: fCreateAgeName(nil)
|
||||
{
|
||||
}
|
||||
|
||||
@ -181,19 +175,15 @@ pyVaultNode::pyVaultNode( RelVaultNode* nfsNode )
|
||||
: fNode(nfsNode)
|
||||
, fCreateAgeName(nil)
|
||||
{
|
||||
if (fNode)
|
||||
fNode->Ref("pyVaultNode");
|
||||
}
|
||||
|
||||
pyVaultNode::~pyVaultNode()
|
||||
{
|
||||
if (fNode)
|
||||
fNode->UnRef("pyVaultNode");
|
||||
free(fCreateAgeName);
|
||||
}
|
||||
|
||||
|
||||
RelVaultNode* pyVaultNode::GetNode() const
|
||||
hsRef<RelVaultNode> pyVaultNode::GetNode() const
|
||||
{
|
||||
return fNode;
|
||||
}
|
||||
@ -202,8 +192,8 @@ RelVaultNode* pyVaultNode::GetNode() const
|
||||
// override the equals to operator
|
||||
bool pyVaultNode::operator==(const pyVaultNode &vaultNode) const
|
||||
{
|
||||
RelVaultNode* ours = GetNode();
|
||||
RelVaultNode* theirs = vaultNode.GetNode();
|
||||
hsRef<RelVaultNode> ours = GetNode();
|
||||
hsRef<RelVaultNode> theirs = vaultNode.GetNode();
|
||||
if (ours == nil && theirs == nil)
|
||||
return true;
|
||||
if (ours == nil || theirs == nil)
|
||||
@ -418,14 +408,10 @@ PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, uint32_t
|
||||
&result
|
||||
);
|
||||
|
||||
if (newNode) {
|
||||
newNode->Ref();
|
||||
pynode->fNode->UnRef();
|
||||
if (newNode)
|
||||
pynode->fNode = newNode;
|
||||
}
|
||||
else {
|
||||
else
|
||||
hsResult = hsFail;
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* nodeRef = cb->fPyNodeRef = pyVaultNodeRef::New(fNode, pynode->fNode);
|
||||
@ -530,11 +516,8 @@ void pyVaultNode::Save(PyObject* cbObject, uint32_t cbContext)
|
||||
// otherwise just ignore the save request since vault nodes are now auto-saved.
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result)) {
|
||||
node->Ref();
|
||||
fNode->UnRef();
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result))
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
pyVaultNodeOperationCallback * cb = new pyVaultNodeOperationCallback( cbObject );
|
||||
cb->SetNode(fNode);
|
||||
@ -555,11 +538,8 @@ void pyVaultNode::ForceSave()
|
||||
{
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result)) {
|
||||
node->Ref();
|
||||
fNode->UnRef();
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result))
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
else
|
||||
VaultForceSaveNodeAndWait(fNode);
|
||||
@ -575,11 +555,8 @@ void pyVaultNode::SendTo(uint32_t destClientNodeID, PyObject* cbObject, uint32_t
|
||||
// If the node doesn't have an id, then use it as a template to create the node in the vault,
|
||||
if (!fNode->GetNodeId() && fNode->GetNodeType()) {
|
||||
ENetError result;
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result)) {
|
||||
node->Ref();
|
||||
fNode->UnRef();
|
||||
if (hsRef<RelVaultNode> node = VaultCreateNodeAndWait(fNode, &result))
|
||||
fNode = node;
|
||||
}
|
||||
}
|
||||
|
||||
// Hack the callbacks until vault notification is in place
|
||||
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "pyGlueHelpers.h"
|
||||
#include "hsRefCnt.h"
|
||||
|
||||
struct RelVaultNode;
|
||||
class plMipmap;
|
||||
@ -82,7 +83,7 @@ public:
|
||||
struct pyVaultNodeOperationCallback
|
||||
{
|
||||
PyObject * fCbObject;
|
||||
RelVaultNode * fNode;
|
||||
hsRef<RelVaultNode> fNode;
|
||||
PyObject * fPyNodeRef;
|
||||
uint32_t fContext;
|
||||
|
||||
@ -94,10 +95,10 @@ public:
|
||||
void VaultOperationComplete(int resultCode) { VaultOperationComplete(fContext, resultCode); }
|
||||
|
||||
void SetNode (RelVaultNode * rvn);
|
||||
RelVaultNode * GetNode ();
|
||||
hsRef<RelVaultNode> GetNode() const;
|
||||
};
|
||||
|
||||
RelVaultNode * fNode;
|
||||
hsRef<RelVaultNode> fNode;
|
||||
mutable char * fCreateAgeName;
|
||||
|
||||
protected:
|
||||
@ -118,7 +119,7 @@ public:
|
||||
|
||||
static void AddPlasmaClasses(PyObject *m);
|
||||
|
||||
RelVaultNode * GetNode() const;
|
||||
hsRef<RelVaultNode> GetNode() const;
|
||||
|
||||
// override the equals to operator
|
||||
bool operator==(const pyVaultNode &vaultNode) const;
|
||||
|
@ -541,11 +541,7 @@ PYTHON_EXPOSE_TYPE_DEFINITION(ptVaultNode, pyVaultNode);
|
||||
PyObject *pyVaultNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultNode *newObj = (ptVaultNode*)ptVaultNode_type.tp_new(&ptVaultNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -65,22 +65,20 @@ pyVaultNodeRef::pyVaultNodeRef(RelVaultNode * parent, RelVaultNode * child)
|
||||
: fParent(parent)
|
||||
, fChild(child)
|
||||
{
|
||||
fParent->Ref();
|
||||
fChild->Ref();
|
||||
}
|
||||
|
||||
pyVaultNodeRef::pyVaultNodeRef(int)
|
||||
: fParent(nil)
|
||||
, fChild(nil)
|
||||
{
|
||||
}
|
||||
|
||||
pyVaultNodeRef::~pyVaultNodeRef()
|
||||
hsRef<RelVaultNode> pyVaultNodeRef::GetParentNode() const
|
||||
{
|
||||
if (fParent)
|
||||
fParent->UnRef();
|
||||
if (fChild)
|
||||
fChild->UnRef();
|
||||
return fParent;
|
||||
}
|
||||
|
||||
hsRef<RelVaultNode> pyVaultNodeRef::GetChildNode() const
|
||||
{
|
||||
return fChild;
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,13 +50,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "pyGlueHelpers.h"
|
||||
#include "hsRefCnt.h"
|
||||
|
||||
struct RelVaultNode;
|
||||
|
||||
class pyVaultNodeRef
|
||||
{
|
||||
RelVaultNode * fParent;
|
||||
RelVaultNode * fChild;
|
||||
hsRef<RelVaultNode> fParent;
|
||||
hsRef<RelVaultNode> fChild;
|
||||
|
||||
protected:
|
||||
// should only be created from C++ side
|
||||
@ -64,10 +65,8 @@ protected:
|
||||
pyVaultNodeRef(int =0 );
|
||||
|
||||
public:
|
||||
~pyVaultNodeRef();
|
||||
|
||||
RelVaultNode * GetParentNode () const { return fParent; }
|
||||
RelVaultNode * GetChildNode () const { return fChild; }
|
||||
hsRef<RelVaultNode> GetParentNode() const;
|
||||
hsRef<RelVaultNode> GetChildNode() const;
|
||||
|
||||
// required functions for PyObject interoperability
|
||||
PYTHON_EXPOSE_TYPE; // so we can subclass
|
||||
|
@ -125,16 +125,8 @@ PYTHON_EXPOSE_TYPE_DEFINITION(ptVaultNodeRef, pyVaultNodeRef);
|
||||
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->UnRef();
|
||||
if (newObj->fThis->fChild)
|
||||
newObj->fThis->fChild->UnRef();
|
||||
newObj->fThis->fParent = parent;
|
||||
newObj->fThis->fChild = child;
|
||||
if (newObj->fThis->fParent)
|
||||
newObj->fThis->fParent->Ref();
|
||||
if (newObj->fThis->fChild)
|
||||
newObj->fThis->fChild->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -93,10 +93,9 @@ bool pyVaultPlayerInfoListNode::HasPlayer( uint32_t playerID )
|
||||
|
||||
static void IAddPlayer_NodesFound(ENetError result, void* param, unsigned nodeIdCount, const unsigned nodeIds[])
|
||||
{
|
||||
NetVaultNode* parent = static_cast<NetVaultNode*>(param);
|
||||
hsRef<NetVaultNode> parent = static_cast<NetVaultNode*>(param);
|
||||
if (nodeIdCount)
|
||||
VaultAddChildNode(parent->GetNodeId(), nodeIds[0], VaultGetPlayerId(), nullptr, nullptr);
|
||||
parent->UnRef();
|
||||
}
|
||||
|
||||
void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
@ -104,8 +103,7 @@ void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
if (HasPlayer(playerID) || !fNode)
|
||||
return;
|
||||
|
||||
NetVaultNode* templateNode = new NetVaultNode();
|
||||
templateNode->Ref();
|
||||
hsRef<NetVaultNode> templateNode = new NetVaultNode();
|
||||
templateNode->SetNodeType(plVault::kNodeType_PlayerInfo);
|
||||
VaultPlayerInfoNode access(templateNode);
|
||||
access.SetPlayerId(playerID);
|
||||
@ -116,10 +114,8 @@ void pyVaultPlayerInfoListNode::AddPlayer( uint32_t playerID )
|
||||
// So, if we know about this node, we can take it easy. If not, we lazy load it.
|
||||
if (nodeIds.Count())
|
||||
VaultAddChildNode(fNode->GetNodeId(), nodeIds[0], VaultGetPlayerId(), nullptr, nullptr);
|
||||
else {
|
||||
fNode->Ref();
|
||||
else
|
||||
VaultFindNodes(templateNode, IAddPlayer_NodesFound, fNode);
|
||||
}
|
||||
}
|
||||
|
||||
void pyVaultPlayerInfoListNode::RemovePlayer( uint32_t playerID )
|
||||
|
@ -179,11 +179,7 @@ PLASMA_DEFAULT_TYPE_WBASE(ptVaultPlayerInfoListNode, pyVaultFolderNode, "Params:
|
||||
PyObject *pyVaultPlayerInfoListNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerInfoListNode *newObj = (ptVaultPlayerInfoListNode*)ptVaultPlayerInfoListNode_type.tp_new(&ptVaultPlayerInfoListNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -171,11 +171,7 @@ PYTHON_CLASS_NEW_IMPL(ptVaultPlayerInfoNode, pyVaultPlayerInfoNode)
|
||||
PyObject *pyVaultPlayerInfoNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerInfoNode *newObj = (ptVaultPlayerInfoNode*)ptVaultPlayerInfoNode_type.tp_new(&ptVaultPlayerInfoNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -321,11 +321,7 @@ PYTHON_CLASS_NEW_IMPL(ptVaultPlayerNode, pyVaultPlayerNode)
|
||||
PyObject *pyVaultPlayerNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultPlayerNode *newObj = (ptVaultPlayerNode*)ptVaultPlayerNode_type.tp_new(&ptVaultPlayerNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -129,11 +129,7 @@ PYTHON_CLASS_NEW_IMPL(ptVaultSDLNode, pyVaultSDLNode)
|
||||
PyObject *pyVaultSDLNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultSDLNode *newObj = (ptVaultSDLNode*)ptVaultSDLNode_type.tp_new(&ptVaultSDLNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,7 @@ PYTHON_CLASS_NEW_IMPL(ptVaultSystemNode, pyVaultSystemNode)
|
||||
PyObject *pyVaultSystemNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultSystemNode *newObj = (ptVaultSystemNode*)ptVaultSystemNode_type.tp_new(&ptVaultSystemNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
@ -318,11 +318,7 @@ PYTHON_CLASS_NEW_IMPL(ptVaultTextNoteNode, pyVaultTextNoteNode)
|
||||
PyObject *pyVaultTextNoteNode::New(RelVaultNode* nfsNode)
|
||||
{
|
||||
ptVaultTextNoteNode *newObj = (ptVaultTextNoteNode*)ptVaultTextNoteNode_type.tp_new(&ptVaultTextNoteNode_type, NULL, NULL);
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->UnRef();
|
||||
newObj->fThis->fNode = nfsNode;
|
||||
if (newObj->fThis->fNode)
|
||||
newObj->fThis->fNode->Ref();
|
||||
return (PyObject*)newObj;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user