8000 Merge pull request #13392 from charris/fix-for-broken-pypy · numpy/numpy@5176a6d · GitHub
[go: up one dir, main page]

Skip to content

Commit 5176a6d

Browse files
authored
Merge pull request #13392 from charris/fix-for-broken-pypy
BUG: Some PyPy versions lack PyStructSequence_InitType2.
2 parents 0f6677c + 7aa4f92 commit 5176a6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numpy/core/src/multiarray/typeinfo.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ PyArray_typeinforanged(
104104
return entry;
105105
}
106106

107-
/* Backport, only needed here */
108-
#if PY_VERSION_HEX < 0x03040000
107+
/* Python version only needed for backport to 2.7 */
108+
#if (PY_VERSION_HEX < 0x03040000) \
109+
|| (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM < 0x07020000))
110+
109111
static int
110112
PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc) {
111113
PyStructSequence_InitType(type, desc);

0 commit comments

Comments
 (0)
0