We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38950b8 commit c477a14Copy full SHA for c477a14
1 file changed
Include/pyabi.h
@@ -73,7 +73,12 @@
73
// Since users are free to the macro, and there's no way to undo the
74
// poisoning at the end of Python.h, we only do this in a test module
75
// (test_cext).
76
-# ifdef __GNUC__
+ //
77
+ // Clang's poisoning is stricter than GCC's: it looks in `#elif`
78
+ // expressions after matching `#if`s. We disable it for now.
79
+ // We also provide an undocumented, unsupported opt-out macro to help
80
+ // porting to other compilers. Consider reaching out if you use it.
81
+# if defined(__GNUC__) && !defined(__clang__) && !defined(_Py_NO_GCC_POISON)
82
# undef Py_GIL_DISABLED
83
# pragma GCC poison Py_GIL_DISABLED
84
# endif
0 commit comments