Salome HOME
projects
/
tools
/
medcoupling.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f34bf2d
)
Useful python function to transfert data without copy from SMESH
author
Anthony Geay
<anthony.geay@edf.fr>
Wed, 28 Apr 2021 20:36:44 +0000
(22:36 +0200)
committer
Anthony Geay
<anthony.geay@edf.fr>
Wed, 28 Apr 2021 20:36:44 +0000
(22:36 +0200)
src/MEDCoupling_Swig/MEDCouplingMemArray.i
patch
|
blob
|
history
diff --git
a/src/MEDCoupling_Swig/MEDCouplingMemArray.i
b/src/MEDCoupling_Swig/MEDCouplingMemArray.i
index a3f3ffb733046a58ae6e1cd4c690bc6eff5100f6..b567b4fc86b2c2cb567ae5c4edb476db8a5ecfb5 100644
(file)
--- a/
src/MEDCoupling_Swig/MEDCouplingMemArray.i
+++ b/
src/MEDCoupling_Swig/MEDCouplingMemArray.i
@@
-326,6
+326,8
@@
%newobject MEDCoupling::DataArrayPartDefinition::New;
%newobject MEDCoupling::SlicePartDefinition::New;
%newobject MEDCoupling::DataArrayPartDefinition::New;
%newobject MEDCoupling::SlicePartDefinition::New;
+%newobject FromPyIntPtrToDataArrayByte;
+
%feature("unref") DataArray "$this->decrRef();"
%feature("unref") DataArrayDouble "$this->decrRef();"
%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"
}
%include "DataArrayInt.i"
+
%pythoncode %{
def MEDCouplingStdReduceFunct(cls,params):
a,b=params
%pythoncode %{
def MEDCouplingStdReduceFunct(cls,params):
a,b=params