X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingDataArrayTraits.hxx;h=359bc7ecd8decb0c579c4d4b4e4f592545f0ead2;hb=a019ec6e72f540d3378f3e869c2b19bf4886459c;hp=c22b758dcae67bcff12be988a39cb4623aff0bac;hpb=805f6b27aae3dd3a5e683bb40ab07b5cacf37f20;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx b/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx index c22b758dc..359bc7ecd 100644 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx +++ b/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx @@ -34,9 +34,10 @@ #endif #endif +#ifdef WITH_NUMPY // specific DataArray deallocator callback. This deallocator is used both in the constructor of DataArray and in the toNumPyArr // method. This dellocator uses weakref to determine if the linked numArr is still alive or not. If alive the ownership is given to it. -// if no more alive the "standart" DataArray deallocator is called. +// if no more alive the "standard" DataArray deallocator is called. void numarrdeal(void *pt, void *wron) { void **wronc=(void **)wron; @@ -59,6 +60,7 @@ void numarrdeal(void *pt, void *wron) } delete [] wronc; } +#endif template struct PyCallBackDataArraySt { @@ -327,6 +329,7 @@ PyTypeObject PyCallBackDataArrayDouble_RefType = { PyObject_GC_Del, /*tp_free*/ }; +#ifdef WITH_NUMPY template struct NPYTraits { @@ -347,5 +350,6 @@ struct NPYTraits static PyTypeObject *NPYFunc; static PyObject *Array_SWIGTYPE; }; +#endif #endif