From: caremoli Date: Fri, 12 Mar 2010 09:26:11 +0000 (+0000) Subject: CCAR: add lacking #ifdef WITH_NUMPY in calcium.i for freearg typemaps X-Git-Tag: V5_1_4a1~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cd3fb3e33a92697af7330053a5f83cdc9e42f19c;p=modules%2Fkernel.git CCAR: add lacking #ifdef WITH_NUMPY in calcium.i for freearg typemaps --- diff --git a/src/DSC/DSC_Python/calcium.i b/src/DSC/DSC_Python/calcium.i index 215ad0ab4..5f36a91bf 100644 --- a/src/DSC/DSC_Python/calcium.i +++ b/src/DSC/DSC_Python/calcium.i @@ -476,10 +476,12 @@ struct stringArray } } %typemap(freearg) type* IN_ARRAY3 { +%#ifdef WITH_NUMPY if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } +%#endif } %enddef @@ -511,10 +513,12 @@ TYPEMAP_IN3(double, PyArray_DOUBLE) } } %typemap(freearg) float* ecpval { +%#ifdef WITH_NUMPY if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } +%#endif } /* End of Specific typemap for complex */ @@ -548,6 +552,7 @@ TYPEMAP_IN3(double, PyArray_DOUBLE) } %typemap(freearg) (char** eval,int strSize) { +%#ifdef WITH_NUMPY if (array$argnum) { for(int i=0;i