From: vsr Date: Thu, 11 Nov 2021 06:55:54 +0000 (+0300) Subject: bos #26616 [CEA][Windows] type long MEDCOUPLING failing test: attempt 2 X-Git-Tag: V9_8_0rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=af00b1d2a6df606c786c938644e80e72b0cf750c;p=tools%2Fmedcoupling.git bos #26616 [CEA][Windows] type long MEDCOUPLING failing test: attempt 2 --- diff --git a/src/INTERP_KERNEL/MCIdType.hxx b/src/INTERP_KERNEL/MCIdType.hxx index 54d83f371..522aba0a8 100644 --- a/src/INTERP_KERNEL/MCIdType.hxx +++ b/src/INTERP_KERNEL/MCIdType.hxx @@ -36,6 +36,12 @@ typedef std::int64_t mcIdType; #endif +#ifdef WIN32 +typedef long long mcPyPtrType; +#else +typedef long mcPyPtrType; +#endif + template inline std::size_t ToSizeT(T val) { return static_cast(val); diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 1639e0751..ca7e73946 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -85,7 +85,11 @@ typedef long int mcIdType; #endif %template(i32vec) std::vector; #endif - +#ifdef WIN32 +typedef long long mcPyPtrType; +#else +typedef long mcPyPtrType; +#endif //////////////////// %typemap(out) MEDCoupling::MEDCouplingMesh* diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 6afd214c3..d9433441a 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -3706,7 +3706,7 @@ typedef DataArrayInt64 DataArrayIdType; %inline { - MEDCoupling::DataArrayByte *FromPyIntPtrToDataArrayByte(long intPtr) + MEDCoupling::DataArrayByte *FromPyIntPtrToDataArrayByte(mcPyPtrType intPtr) { MEDCoupling::DataArrayByte *ret(reinterpret_cast(intPtr)); return ret;