]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal...
authorPetr Viktorin <encukou@gmail.com>
Fri, 4 Oct 2024 14:50:34 +0000 (16:50 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Oct 2024 14:50:34 +0000 (16:50 +0200)
commitb3e2c0291595edddc968680689bec7707d27d2d1
tree2983e84e8bdcef37bf222de7d3800dec0911eaa6
parent58f7763b88d4e81662b9d212f6beddcb42437fe3
[3.12] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) (GH-124938)

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: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.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