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:
Petr Viktorin 2022-02-25 09:25:54 +01:00 committed by GitHub
parent 98c3bea4d1
commit 2c228a7b8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 6 deletions

View file

@ -38,6 +38,8 @@
#include "Python.h"
#include "pycore_import.h"
#include <stdbool.h>
/* Includes for frozen modules: */
/* End includes */