This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2021-12-07.17:34:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org>
In-reply-to
Content
The PyUnicode_CHECK_INTERNED() macro uses the PyASCIIObject structure which is *excluded* from the limited C API:

/* Use only if you know it's a string */
#define PyUnicode_CHECK_INTERNED(op) \
    (((PyASCIIObject *)(op))->state.interned)

Using this macro in the limited C API doesn't work.

I propose to remove it from the limited C API.

IMO it's not a good idea to fix the function in the limited C API by converting it to a regular function hiding the implementation details and so working at the ABI level. We should not expose such "implementation detail" (if a string is "interned or not") in the *limited* C API.
History
Date User Action Args
2021-12-07 17:34:25vstinnersetrecipients: + vstinner
2021-12-07 17:34:25vstinnersetmessageid: <1638898465.89.0.178243976292.issue46007@roundup.psfhosted.org>
2021-12-07 17:34:25vstinnerlinkissue46007 messages
2021-12-07 17:34:25vstinnercreate