gh-122854: Add Py_HashBuffer() function (#122855)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user