diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2019-04-22 17:51:09 -0600 |
|---|---|---|
| committer | Charles Harris <charlesr.harris@gmail.com> | 2019-04-22 17:51:09 -0600 |
| commit | 53fb75dffad6bbf918c568d7bb0e87af22503592 (patch) | |
| tree | f96ea2d604a35ee9ecf860f62119ba49e41938eb /numpy/core/src | |
| parent | 2b59dcb273f00e7be13cdc32c5f396a55781c2f4 (diff) | |
| download | numpy-53fb75dffad6bbf918c568d7bb0e87af22503592.tar.gz | |
BUG: Some PyPy versions lack PyStructSequence_InitType2.
Define `PyStructSequence_InitType2` for those PyPy versions that
don't support it.
Closes gh-13384.
Diffstat (limited to 'numpy/core/src')
| -rw-r--r-- | numpy/core/src/multiarray/typeinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/typeinfo.c b/numpy/core/src/multiarray/typeinfo.c index bc4147841..14c4f27cb 100644 --- a/numpy/core/src/multiarray/typeinfo.c +++ b/numpy/core/src/multiarray/typeinfo.c @@ -104,8 +104,10 @@ PyArray_typeinforanged( return entry; } -/* Backport, only needed here */ -#if PY_VERSION_HEX < 0x03040000 +/* Python version only needed for backport to 2.7 */ +#if (PY_VERSION_HEX < 0x03040000) \ + || (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM < 0x07020000)) + static int PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc) { PyStructSequence_InitType(type, desc); |
