From: Anthony Geay Date: Fri, 5 May 2017 06:05:10 +0000 (+0200) Subject: Correct error in wrapping X-Git-Tag: V8_4_0a1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a1df15b9e0bc63ea753bd8056f2f0df3f3973e2;p=tools%2Fmedcoupling.git Correct error in wrapping --- diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index f66c2106c..653f5af58 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -427,6 +427,9 @@ using namespace INTERP_KERNEL; %newobject MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell; %newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell; %newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn; +%newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray; +%newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray; +%newobject MEDCoupling::MEDCouplingSkyLineArray::getValuesArray; %feature("unref") MEDCouplingPointSet "$this->decrRef();" %feature("unref") MEDCouplingMesh "$this->decrRef();" @@ -1216,10 +1219,6 @@ namespace MEDCoupling int getNumberOf() const; int getLength() const; - DataArrayInt* getSuperIndexArray() const; - DataArrayInt* getIndexArray() const; - DataArrayInt* getValuesArray() const; - void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception); %extend @@ -1248,6 +1247,30 @@ namespace MEDCoupling { return self->simpleRepr(); } + + DataArrayInt *getSuperIndexArray() const + { + DataArrayInt *ret(self->getSuperIndexArray()); + if(ret) + ret->incrRef(); + return ret; + } + + DataArrayInt *getIndexArray() const + { + DataArrayInt *ret(self->getIndexArray()); + if(ret) + ret->incrRef(); + return ret; + } + + DataArrayInt *getValuesArray() const + { + DataArrayInt *ret(self->getValuesArray()); + if(ret) + ret->incrRef(); + return ret; + } PyObject *getSimplePackSafe(int absolutePackId) const throw(INTERP_KERNEL::Exception) { diff --git a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i index 7ecf24f86..350ac7555 100644 --- a/src/MEDPartitioner_Swig/MEDPartitionerCommon.i +++ b/src/MEDPartitioner_Swig/MEDPartitionerCommon.i @@ -38,6 +38,8 @@ using namespace MEDPARTITIONER; %newobject MEDPARTITIONER::MEDPartitioner::New; %newobject MEDPARTITIONER::MEDPartitioner::Graph; +%newobject MEDPARTITIONER::MEDPartitioner::Graph::getGraph; +%newobject MEDPARTITIONER::MEDPartitioner::Graph::getPartition; %newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData; %feature("unref") MEDCoupling::MEDFileData "$this->decrRef();" @@ -53,8 +55,20 @@ namespace MEDPARTITIONER typedef enum {METIS,SCOTCH} splitter_type; public: virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception); - const MEDCoupling::MEDCouplingSkyLineArray *getGraph() const; - const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const; + MEDCoupling::MEDCouplingSkyLineArray *getGraph() const + { + const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getGraph()); + if(ret) + ret->incrRef(); + return const_cast(ret); + } + const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const + { + const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getPartition()); + if(ret) + ret->incrRef(); + return const_cast(ret); + } int nbVertices() const; };