Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-12-09.09:00:19.225>created_at=<Date2021-12-07.17:34:25.875>labels= ['expert-C-API', '3.9', '3.10', '3.11']
title="[C API] PyUnicode_CHECK_INTERNED() doesn't work in the limited C API"updated_at=<Date2021-12-09.09:00:19.224>user='https://github.com/vstinner'
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 */
#definePyUnicode_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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: