summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2022-02-02 01:49:46 +0000
committerGitHub <noreply@github.com>2022-02-02 02:49:46 +0100
commitbbac8b5476b1b97afcbac69e3079c11223911908 (patch)
tree7d5724f94ee8bc045d71b3c7dfebc53afc0c3b11
parent229a4531780863c8a5c311d6b3c70a545988f85f (diff)
downloadcython-bbac8b5476b1b97afcbac69e3079c11223911908.tar.gz
Fix a large chunk of exc_info changes on 0.29.x (GH-4610)
By disabling "CYTHON_FAST_THREAD_STATE" and "CYTHON_USE_EXC_INFO_STACK" I think this still leaves some breakage in Coroutines.c but it's enough of a fix that Cython succeeds in building itself. Therefore I think it's worth doing now even if it doesn't fix everything. Related to https://github.com/cython/cython/issues/4500
-rw-r--r--Cython/Utility/ModuleSetupCode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 78b04d896..f9009be09 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -177,7 +177,10 @@
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
- #ifndef CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030B00A4
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #elif !defined(CYTHON_FAST_THREAD_STATE)
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_PYCALL
@@ -194,7 +197,10 @@
#ifndef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
#endif
- #ifndef CYTHON_USE_EXC_INFO_STACK
+ #if PY_VERSION_HEX >= 0x030B00A4
+ #undef CYTHON_USE_EXC_INFO_STACK
+ #define CYTHON_USE_EXC_INFO_STACK 0
+ #elif !defined(CYTHON_USE_EXC_INFO_STACK)
#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
#endif
#endif