cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Move `#include` directives before `extern "C" {` in internal headers

Open colesbury opened this issue 6 months ago • 4 comments

Feature or enhancement

Some of our internal headers (e.g., pycore_ceval.h) contain #include directives inside the extern "C" { blocks. This can cause problems if system headers are included within an extern "C" { block and the header is compiled as C++ code. For a similar issue with the public headers, see #110845.

As far as I can tell, nobody has complained about this yet, but I think we might as well address this sooner rather later.

cc @ericsnowcurrently @gpshead @vstinner

colesbury avatar Feb 06 '24 21:02 colesbury