diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-12-25 13:36:05 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-12-25 12:43:32 +0100 |
commit | 29ad96444b8b1a4f05a6ac2328fde01de4782691 (patch) | |
tree | bb9934f6ed29d57f926748dbdf23586990873ee7 /tests/build | |
parent | af5b1ce600f096bffda790c75b89a99e55b78522 (diff) | |
download | cython-29ad96444b8b1a4f05a6ac2328fde01de4782691.tar.gz |
Adapt to upcoming PyPy3.8/9 releases (GH4517)
Diffstat (limited to 'tests/build')
-rw-r--r-- | tests/build/module_api.srctree | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/build/module_api.srctree b/tests/build/module_api.srctree index 557c20ccd..a313f65b5 100644 --- a/tests/build/module_api.srctree +++ b/tests/build/module_api.srctree @@ -108,9 +108,10 @@ void inita(void) if (!sys_modules) return; mod = PyInit_a(); 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... */ if (!PyModule_Check(mod)) { + /* In PEP 489 multi-phase init, PyInit_a returns PyModuleDef */ PyModuleDef *mdef = (PyModuleDef*)mod; PyObject *modname = PyUnicode_FromString("a"); if (!modname) return; |