Skip to content

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

@colesbury

Description

@colesbury

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions