]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH() (GH-141520)
authorVictor Stinner <vstinner@python.org>
Fri, 14 Nov 2025 10:13:24 +0000 (11:13 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Nov 2025 10:13:24 +0000 (11:13 +0100)
commit3bacae55980561cb99095a20a70c45d6174e056d
tree6561674a5b1d8559989259da84825dc1f844a424
parent181a2f4f2e3bed8dc6be5630e9bfb3362194ab3a
gh-131510: Use PyUnstable_Unicode_GET_CACHED_HASH() (GH-141520)

Replace code that directly accesses PyASCIIObject.hash with
PyUnstable_Unicode_GET_CACHED_HASH().

Remove redundant "assert(PyUnicode_Check(op))" from
PyUnstable_Unicode_GET_CACHED_HASH(), _PyASCIIObject_CAST() already
implements the check.
Include/cpython/unicodeobject.h
Include/internal/pycore_object.h
Objects/dictobject.c
Objects/typeobject.c