Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-141004: Reorganize and reword the 'Useful macros' section#144471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
- Group the macros- Roughly order them to put the most important ones first- Add expansions where it makes sense; especially if there's an equivalent in modern C or a common compiler
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Since you're already moving many functions, it may be interesting to sort functions in each category.
| A use for ``Py_UNREACHABLE()`` is following a call a function that | ||
| never returns but that is not declared:c:macro:`_Py_NO_RETURN`. | ||
| never returns but that is not declared``_Noreturn``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Note: C11 added_Noreturn, but C23 adds[[noreturn]] and deprecates_Noreturn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm aware, but don't want to get in the details too much.
We require C11, and as far as I know, deprecations in the C standard don't mean planned removal.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
encukou commentedFeb 4, 2026
Sort by what? |
vstinner commentedFeb 4, 2026
I'm thinking at the alphabetical order. |
Uh oh!
There was an error while loading.Please reload this page.
This is a follow-up to#143508. When all the public macros were documented, the section became somewhat unwieldy.
📚 Documentation preview 📚:https://cpython-previews--144471.org.readthedocs.build/