diff options
author | Matti Picus <matti.picus@gmail.com> | 2023-05-02 09:07:46 +0300 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2023-05-02 09:04:44 +0200 |
commit | a27f7bc48d9212171f35d692dcdedfa8f8c85df4 (patch) | |
tree | e84479b68d4a03163853205242cb2bc151f48ed8 | |
parent | bba7d3db9e1404efe3bf53f9010f90e22fe59a5b (diff) | |
download | cython-a27f7bc48d9212171f35d692dcdedfa8f8c85df4.tar.gz |
Use CYTHON_PEP489_MULTI_PHASE_INIT on PyPy 3.9 (GH-5414)
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index e8fe62be0..20f88d07b 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -76,8 +76,11 @@ #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 - #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_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS |