Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Aug 26, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

…MOUS` (GH-137283)

We already use an anonymous union for PyObject. This makes the workarounds available in all public headers:

- MSVC: `__pragma(warning(disable: 4201))` (with push/pop). Warning 4201 is specifically for anonymous unions, so let's disable for all of `<Python.h>`
- GCC/clang, pedantic old C standards: define `_Py_ANONYMOUS` as `__extension__`
- otherwise, define `_Py_ANONYMOUS` as nothing 

(Note that this is only for public headers -- CPython internals use C11, which has anonymous structs/unions.)

C API WG vote: capi-workgroup/decisions#74
@pull pull bot locked and limited conversation to collaborators Aug 26, 2025
@pull pull bot added the ⤵️ pull label Aug 26, 2025
@pull pull bot merged commit ce1a877 into TechPenguineer:main Aug 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant