]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Useful python function to transfert data without copy from SMESH
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 28 Apr 2021 20:36:44 +0000 (22:36 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 28 Apr 2021 20:36:44 +0000 (22:36 +0200)
src/MEDCoupling_Swig/MEDCouplingMemArray.i

index a3f3ffb733046a58ae6e1cd4c690bc6eff5100f6..b567b4fc86b2c2cb567ae5c4edb476db8a5ecfb5 100644 (file)
 %newobject MEDCoupling::DataArrayPartDefinition::New;
 %newobject MEDCoupling::SlicePartDefinition::New;
 
+%newobject FromPyIntPtrToDataArrayByte;
+
 
 %feature("unref") DataArray "$this->decrRef();"
 %feature("unref") DataArrayDouble "$this->decrRef();"
@@ -3698,10 +3700,21 @@ typedef DataArrayInt64 DataArrayIdType;
       }
     }
   };
+
+}
+
+%inline
+{
+  MEDCoupling::DataArrayByte *FromPyIntPtrToDataArrayByte(long intPtr)
+  {
+    MEDCoupling::DataArrayByte *ret(reinterpret_cast<MEDCoupling::DataArrayByte *>(intPtr));
+    return ret;
+  }
 }
 
 %include "DataArrayInt.i"
 
+
 %pythoncode %{
 def MEDCouplingStdReduceFunct(cls,params):
     a,b=params