Includes/internal/pycore_code.h
uses static_assert()
but does not inlcude pymacro.h
· Issue #123747 · python/cpython (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Bug report
Bug description:
Includes/internal/pycore_code.h
uses static_assert()
but does not inlcude pymacro.h
, should it?
AFAIU pymacro.h
makes sure that static_assert()
is correctly defined for all supported compilers and platforms. Not including it in Includes/internal/pycore_code.h
implicitly relies on pymacro.h
being included before or via transitive includes.
I've found this while investigating a Cython extension module build failure. Cython includes the private header and thus requires static_macro()
to be defined.
CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
No response