Commit 29ad9644 authored by Matti Picus's avatar Matti Picus Committed by Stefan Behnel

Adapt to upcoming PyPy3.8/9 releases (GH4517)

parent af5b1ce6
...@@ -891,7 +891,7 @@ slot_table = ( ...@@ -891,7 +891,7 @@ slot_table = (
EmptySlot("tp_vectorcall", ifdef="PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)"), EmptySlot("tp_vectorcall", ifdef="PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)"),
EmptySlot("tp_print", ifdef="PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000"), EmptySlot("tp_print", ifdef="PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000"),
# PyPy specific extension - only here to avoid C compiler warnings. # PyPy specific extension - only here to avoid C compiler warnings.
EmptySlot("tp_pypy_flags", ifdef="CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000"), EmptySlot("tp_pypy_flags", ifdef="CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000"),
) )
#------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------
......
...@@ -427,7 +427,7 @@ static PyTypeObject __pyx_AsyncGenType_type = { ...@@ -427,7 +427,7 @@ static PyTypeObject __pyx_AsyncGenType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -665,7 +665,7 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = { ...@@ -665,7 +665,7 @@ static PyTypeObject __pyx__PyAsyncGenASendType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -783,7 +783,7 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = { ...@@ -783,7 +783,7 @@ static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -1071,7 +1071,7 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = { ...@@ -1071,7 +1071,7 @@ static PyTypeObject __pyx__PyAsyncGenAThrowType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
......
...@@ -1563,7 +1563,7 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = { ...@@ -1563,7 +1563,7 @@ static PyTypeObject __pyx_CoroutineAwaitType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -1723,7 +1723,7 @@ static PyTypeObject __pyx_CoroutineType_type = { ...@@ -1723,7 +1723,7 @@ static PyTypeObject __pyx_CoroutineType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -1837,7 +1837,7 @@ static PyTypeObject __pyx_IterableCoroutineType_type = { ...@@ -1837,7 +1837,7 @@ static PyTypeObject __pyx_IterableCoroutineType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -1948,7 +1948,7 @@ static PyTypeObject __pyx_GeneratorType_type = { ...@@ -1948,7 +1948,7 @@ static PyTypeObject __pyx_GeneratorType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
......
...@@ -736,7 +736,7 @@ static PyTypeObject __pyx_CyFunctionType_type = { ...@@ -736,7 +736,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
...@@ -1268,7 +1268,7 @@ static PyTypeObject __pyx_FusedFunctionType_type = { ...@@ -1268,7 +1268,7 @@ static PyTypeObject __pyx_FusedFunctionType_type = {
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
0, /*tp_print*/ 0, /*tp_print*/
#endif #endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX > 0x03080000 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
0, /*tp_pypy_flags*/ 0, /*tp_pypy_flags*/
#endif #endif
}; };
......
...@@ -108,9 +108,10 @@ void inita(void) ...@@ -108,9 +108,10 @@ void inita(void)
if (!sys_modules) return; if (!sys_modules) return;
mod = PyInit_a(); mod = PyInit_a();
if (!mod) return; if (!mod) return;
#if PY_VERSION_HEX >= 0x03050000 #if PY_VERSION_HEX >= 0x03050000 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
/* FIXME: this is incomplete and users shouldn't have to do this in the first place... */ /* FIXME: this is incomplete and users shouldn't have to do this in the first place... */
if (!PyModule_Check(mod)) { if (!PyModule_Check(mod)) {
/* In PEP 489 multi-phase init, PyInit_a returns PyModuleDef */
PyModuleDef *mdef = (PyModuleDef*)mod; PyModuleDef *mdef = (PyModuleDef*)mod;
PyObject *modname = PyUnicode_FromString("a"); PyObject *modname = PyUnicode_FromString("a");
if (!modname) return; if (!modname) return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment