]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
try to reduce ifdef for WIN porting agy/winafter_64bit_ids_check
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 14 Jan 2020 06:52:14 +0000 (07:52 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 14 Jan 2020 06:52:14 +0000 (07:52 +0100)
src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx
src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i

index dc07ddd68f2d2a0c93413cd9fecd6e0b892b31f4..e219ff92992e25cccf43cc2871d6f3deee023c5a 100644 (file)
@@ -147,12 +147,8 @@ extern "C"
   static PyObject *callbackmcdataarrayint64_call(PyCallBackDataArrayInt64 *self, PyObject *args, PyObject *kw)
   {
     if(self->_pt_mc)
-      {
-#ifdef WIN32   
-        MEDCoupling::MemArray<long long>& mma=self->_pt_mc->accessToMemArray();
-#else
-        MEDCoupling::MemArray<long>& mma=self->_pt_mc->accessToMemArray();
-#endif
+      {        
+        MEDCoupling::MemArray<MEDCoupling::Int64>& mma=self->_pt_mc->accessToMemArray();
         mma.destroy();
       }
     Py_XINCREF(Py_None);
@@ -429,11 +425,7 @@ struct NPYTraits<int>
 };
 
 template<>
-#ifdef WIN32
-struct NPYTraits<long long>
-#else
-struct NPYTraits<long>
-#endif
+struct NPYTraits<MEDCoupling::Int64>
 {
   static const int NPYObjectType=NPY_INT64;
   static PyTypeObject *NPYFunc;
index 5c21279f69b0a6d1b14c4781efe80a1ca1753961..31ff419eaae26ab3c46dee60c0a2fa9d76288b3d 100644 (file)
@@ -3363,11 +3363,7 @@ PyTypeObject *NPYTraits<float>::NPYFunc=&PyCallBackDataArrayFloat_RefType;
 
 PyTypeObject *NPYTraits<int>::NPYFunc=&PyCallBackDataArrayInt32_RefType;
 
-#ifdef WIN32
-PyTypeObject *NPYTraits<long long>::NPYFunc=&PyCallBackDataArrayInt64_RefType;
-#else
-PyTypeObject *NPYTraits<long>::NPYFunc=&PyCallBackDataArrayInt64_RefType;
-#endif
+PyTypeObject *NPYTraits<MEDCoupling::Int64>::NPYFunc=&PyCallBackDataArrayInt64_RefType;
 #endif
 
 template<class T>