mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
This commit is contained in:
parent
98c3bea4d1
commit
2c228a7b8f
6 changed files with 11 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue