diff options
author | Matti Picus <matti.picus@gmail.com> | 2023-05-02 09:07:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 08:07:46 +0200 |
commit | d62bc6d633bb30d9c9656469f2c553b4e77de9c9 (patch) | |
tree | 5d1f4ffbb7028d4bd48021ad8f67437539c2a96a | |
parent | 0d34008a1746827519589d2e85bc3f54819d47ca (diff) | |
download | cython-d62bc6d633bb30d9c9656469f2c553b4e77de9c9.tar.gz |
Use CYTHON_PEP489_MULTI_PHASE_INIT on PyPy 3.9 (GH-5414)
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 8f926e757..c3b46c09c 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -159,7 +159,11 @@ #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #if PY_VERSION_HEX >= 0x03090000 + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #else + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_TP_FINALIZE |