Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Oct 11, 2023

If the Py_LIMITED_API macro is defined, Py_BUILD_CORE, Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now undefined by Python.h.

Only undefine these 3 macros after including "exports.h" which uses them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros.


📚 Documentation preview 📚: https://cpython-previews--110725.org.readthedocs.build/

If the Py_LIMITED_API macro is defined, Py_BUILD_CORE, Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now undefined by Python.h. Only undefine these 3 macros after including "exports.h" which uses them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros.
@vstinnervstinnerforce-pushed the limited_api_build_core branch from 097c71b to 105fce1CompareOctober 11, 2023 15:38
@vstinnervstinner merged commit 6f4a499 into python:mainOct 11, 2023
@vstinnervstinner deleted the limited_api_build_core branch October 11, 2023 20:47
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…ython#110725) If the Py_LIMITED_API macro is defined, Py_BUILD_CORE, Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now undefined by Python.h. Only undefine these 3 macros after including "exports.h" which uses them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros. Remove hacks (undefine manually the 3 Py_BUILD_CORE macros) in Modules/_testcapi/parts.h and Modules/_testclinic_limited.c.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vstinner