diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2018-05-24 09:48:30 -0700 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2018-05-24 22:16:08 -0700 |
| commit | 95c1e49c64ebb7a60dae7355a9f37d1cefef9cc6 (patch) | |
| tree | b2eef71e418855699353f4c50efde3e45f7e49a4 /numpy | |
| parent | 4311c8dbbb04e2be40a651a27a7aeabe43c7f14f (diff) | |
| download | numpy-95c1e49c64ebb7a60dae7355a9f37d1cefef9cc6.tar.gz | |
MAINT: Use moved definition of Npy_EnterRecursiveCall
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/number.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/numpy/core/src/multiarray/number.c b/numpy/core/src/multiarray/number.c index 14389a925..448d2d9c2 100644 --- a/numpy/core/src/multiarray/number.c +++ b/numpy/core/src/multiarray/number.c @@ -16,15 +16,6 @@ #include "binop_override.h" -/* <2.7.11 and <3.4.4 have the wrong argument type for Py_EnterRecursiveCall */ -#if (PY_VERSION_HEX < 0x02070B00) || \ - ((0x03000000 <= PY_VERSION_HEX) && (PY_VERSION_HEX < 0x03040400)) - #define _Py_EnterRecursiveCall(x) Py_EnterRecursiveCall((char *)(x)) -#else - #define _Py_EnterRecursiveCall(x) Py_EnterRecursiveCall(x) -#endif - - /************************************************************************* **************** Implement Number Protocol **************************** *************************************************************************/ @@ -796,7 +787,7 @@ _array_nonzero(PyArrayObject *mp) n = PyArray_SIZE(mp); if (n == 1) { int res; - if (_Py_EnterRecursiveCall(" while converting array to bool")) { + if (Npy_EnterRecursiveCall(" while converting array to bool")) { return -1; } res = PyArray_DESCR(mp)->f->nonzero(PyArray_DATA(mp), mp); @@ -850,7 +841,7 @@ array_scalar_forward(PyArrayObject *v, /* Need to guard against recursion if our array holds references */ if (PyDataType_REFCHK(PyArray_DESCR(v))) { PyObject *res; - if (_Py_EnterRecursiveCall(where) != 0) { + if (Npy_EnterRecursiveCall(where) != 0) { Py_DECREF(scalar); return NULL; } |
