Skip to content

bpo-46006: Fix _PyUnicode_EqualToASCIIId() for interned strings#30123

Closed
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:interned
Closed

bpo-46006: Fix _PyUnicode_EqualToASCIIId() for interned strings#30123
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:interned

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Dec 15, 2021

Fix string comparisons for subinterpreters: no longer make the assumption
that two interned strings are not equal if they have different different
memory addresses. This assumption is no longer true since interned
strings have been made per interpreter in Python 3.10.

Fix _PyUnicode_EqualToASCIIId() and type update_slot() functions.

The change makes update_slot() a little bit less efficient:
update_slot() now compares the strings contents, rather than
comparing strings memory addresses.

https://bugs.python.org/issue46006

Fix string comparisons for subinterpreters: no longer make the assumption
that two interned strings are not equal if they have different different
memory addresses. This assumption is no longer true since interned
strings have been made per interpreter in Python 3.10.

Fix _PyUnicode_EqualToASCIIId() and type update_slot() functions.

The change makes update_slot() a little bit less efficient:
update_slot() now compares the strings contents, rather than
comparing strings memory addresses.