mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-122854: Add Py_HashBuffer() function (#122855)
This commit is contained in:
parent
3d60dfbe17
commit
d8e69b2c1b
17 changed files with 80 additions and 25 deletions
|
@ -11688,7 +11688,7 @@ unicode_hash(PyObject *self)
|
|||
if (hash != -1) {
|
||||
return hash;
|
||||
}
|
||||
x = _Py_HashBytes(PyUnicode_DATA(self),
|
||||
x = Py_HashBuffer(PyUnicode_DATA(self),
|
||||
PyUnicode_GET_LENGTH(self) * PyUnicode_KIND(self));
|
||||
|
||||
FT_ATOMIC_STORE_SSIZE_RELAXED(_PyUnicode_HASH(self), x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue