diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2018-06-08 11:44:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 11:44:17 -0400 |
commit | ccb2a712ab55a34b26b06bfd325020af3889b00c (patch) | |
tree | 9eb59ad9d313c9c1490e19682280d1820028902a /numpy/core/include | |
parent | da5eaf97281453083252c22b2b94aded846a936b (diff) | |
parent | 95c1e49c64ebb7a60dae7355a9f37d1cefef9cc6 (diff) | |
download | numpy-ccb2a712ab55a34b26b06bfd325020af3889b00c.tar.gz |
Merge pull request #11155 from eric-wieser/datetime-stack-overflow
BUG: Prevent stackoverflow in conversion to datetime types
Diffstat (limited to 'numpy/core/include')
-rw-r--r-- | numpy/core/include/numpy/npy_3kcompat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h index 56fbd99af..2d0ccd3b9 100644 --- a/numpy/core/include/numpy/npy_3kcompat.h +++ b/numpy/core/include/numpy/npy_3kcompat.h @@ -61,6 +61,14 @@ static NPY_INLINE int PyInt_Check(PyObject *op) { PySlice_GetIndicesEx((PySliceObject *)op, nop, start, end, step, slicelength) #endif +/* <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 Npy_EnterRecursiveCall(x) Py_EnterRecursiveCall((char *)(x)) +#else + #define Npy_EnterRecursiveCall(x) Py_EnterRecursiveCall(x) +#endif + /* * PyString -> PyBytes */ |