Salome HOME
Merge remote-tracking branch 'origin/abn/bug_fixes' into V8_5_BR
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingDataArrayTraits.hxx
index 10521d8232caa36d9c05e42d5296e04fd70cfb08..359bc7ecd8decb0c579c4d4b4e4f592545f0ead2 100644 (file)
 #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<class MCData>
 struct PyCallBackDataArraySt {
@@ -327,6 +329,7 @@ PyTypeObject PyCallBackDataArrayDouble_RefType = {
   PyObject_GC_Del,            /*tp_free*/
 };
 
+#ifdef WITH_NUMPY
 template<class T>
 struct NPYTraits
 {
@@ -345,6 +348,8 @@ struct NPYTraits<float>
 {
   static const int NPYObjectType=NPY_FLOAT;
   static PyTypeObject *NPYFunc;
+  static PyObject *Array_SWIGTYPE;
 };
+#endif
 
 #endif