]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Jul 2024 13:42:49 +0000 (15:42 +0200)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2024 13:42:49 +0000 (13:42 +0000)
commit281ffb60cc194c4eefee3e112888251abd1a749a
tree7fb29528eb8483fa72622c84a69dd4a1d4bce098
parentf0e4b02c3930b51d94a7e7827710d0468c763bc7
[3.13] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) (GH-121851)

gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
(cherry picked from commit 956270d08d5c23f59937e2f29f8e0b7f63d68afd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Misc/NEWS.d/next/C API/2024-07-04-13-23-27.gh-issue-113601.K3RLqp.rst [new file with mode: 0644]
Objects/unicodeobject.c