Visitar URL original
bpo-46007: Exclude PyUnicode_CHECK_INTERNED() from limited C API by vstinner · Pull Request #29987 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20251002172521/https://github.com/python/cpython/pull/29987
Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 8, 2021 •

Exclude the PyUnicode_CHECK_INTERNED() macro from the limited C API,
because it uses the PyASCIIObject structure which is excluded from
the limited C API.

https://bugs.python.org/issue46007

Automerge-Triggered-By: GH:encukou

@vstinner
Copy link
Member Author

vstinner commented Dec 8, 2021

cc @encukou

Comment on lines 718 to 721
Copy link
Member

@encukou encukou Dec 8, 2021 •

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used PyUnicodeObject in 3.2, so I'd either omit the reference to PyASCIIObject or include both.

Suggested change
* The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the
limited C API, because it uses the ``PyASCIIObject`` structure which is
excluded from the limited C API.
(Contributed by Victor Stinner in :issue:`46007`.)
* The :c:func:`PyUnicode_CHECK_INTERNED` macro has been excluded from the
limited C API. It was never usable there, because it used internal structures
which are not available in the limited C API.
(Contributed by Victor Stinner in :issue:`46007`.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I applied your suggestion.

The PyUnicode_CHECK_INTERNED() macro has been excluded from the
limited C API. It was never usable there, because it used internal
structures which are not available in the limited C API.
@encukou
Copy link
Member

encukou commented Dec 9, 2021

Thank you!

@miss-islington miss-islington merged commit 73325bb into python:main Dec 9, 2021
@vstinner vstinner deleted the unicode_check_interned branch December 9, 2021 09:00
Sign up for free to 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.

5 participants