10000 BUG: Some PyPy versions lack PyStructSequence_InitType2. · numpy/numpy@7aa4f92 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7aa4f92

Browse files
committed
BUG: Some PyPy versions lack PyStructSequence_InitType2.
Define `PyStructSequence_InitType2` for those PyPy versions that don't support it. Closes gh-13384.
1 parent 0f6677c commit 7aa4f92

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