1 /* Python include */ 2 3 #ifndef NUMBA_UFUNC_INTERNAL_H_ 4 #define NUMBA_UFUNC_INTERNAL_H_ 5 6 #include "../../_pymodule.h" 7 #include <structmember.h> 8 9 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION 10 #include "numpy/ndarrayobject.h" 11 #include "numpy/ufuncobject.h" 12 13 extern PyObject *ufunc_fromfunc(PyObject *NPY_UNUSED(dummy), PyObject *args); 14 15 int PyUFunc_GeneralizedFunction(PyUFuncObject *ufunc, 16 PyObject *args, PyObject *kwds, 17 PyArrayObject **op); 18 19 #define APPEND_(X, Y) X #Y 20 #define APPEND(X, Y) APPEND_(X, Y) 21 #define SENTRY_VALID_LONG(X) if( (X) == -1 ){ \ 22 PyErr_SetString(PyExc_RuntimeError, \ 23 APPEND("PyLong_AsLong overflow at ", __LINE__)); \ 24 return NULL; \ 25 } 26 27 #endif /* NUMBA_UFUNC_INTERNAL_H_ */