From: Anthony Geay Date: Tue, 14 Jan 2020 06:52:14 +0000 (+0100) Subject: try to reduce ifdef for WIN porting X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d4a6018335902a05899afed3404dfddd704867de;p=tools%2Fmedcoupling.git try to reduce ifdef for WIN porting --- diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx b/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx index dc07ddd68..e219ff929 100644 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx +++ b/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx @@ -147,12 +147,8 @@ extern "C" static PyObject *callbackmcdataarrayint64_call(PyCallBackDataArrayInt64 *self, PyObject *args, PyObject *kw) { if(self->_pt_mc) - { -#ifdef WIN32 - MEDCoupling::MemArray& mma=self->_pt_mc->accessToMemArray(); -#else - MEDCoupling::MemArray& mma=self->_pt_mc->accessToMemArray(); -#endif + { + MEDCoupling::MemArray& mma=self->_pt_mc->accessToMemArray(); mma.destroy(); } Py_XINCREF(Py_None); @@ -429,11 +425,7 @@ struct NPYTraits }; template<> -#ifdef WIN32 -struct NPYTraits -#else -struct NPYTraits -#endif +struct NPYTraits { static const int NPYObjectType=NPY_INT64; static PyTypeObject *NPYFunc; diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i index 5c21279f6..31ff419ea 100644 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i @@ -3363,11 +3363,7 @@ PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayFloat_RefType; PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayInt32_RefType; -#ifdef WIN32 -PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayInt64_RefType; -#else -PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayInt64_RefType; -#endif +PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayInt64_RefType; #endif template