summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2022-02-25 08:25:54 (GMT)
committerGitHub <noreply@github.com>2022-02-25 08:25:54 (GMT)
commit2c228a7b8f89e9ed8d390370abd771d4993b79d8 (patch)
tree6c3316eb466ed4feb1221d4ece109695f01e77aa /Modules
parent98c3bea4d1c7335135e60946d0ec8cd5031fb6c0 (diff)
downloadcpython-2c228a7b8f89e9ed8d390370abd771d4993b79d8.zip
cpython-2c228a7b8f89e9ed8d390370abd771d4993b79d8.tar.gz
cpython-2c228a7b8f89e9ed8d390370abd771d4993b79d8.tar.bz2
bpo-46748: Don't import <stdbool.h> in public headers (GH-31553)
<stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included. It's OK to use stdbool outside the public headers, though. https://bugs.python.org/issue46748
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 0be42f3..6fa0cce 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -40,6 +40,9 @@
# error "_testcapi must test the public Python C API, not CPython internal C API"
#endif
+#ifdef bool
+# error "The public headers should not include <stdbool.h>, see bpo-46748"
+#endif
// Forward declarations
static struct PyModuleDef _testcapimodule;