gh-122854: Add Py_HashBuffer() function (#122855)

This commit is contained in:
Victor Stinner 2024-08-30 17:42:27 +02:00 committed by GitHub
parent 3d60dfbe17
commit d8e69b2c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 80 additions and 25 deletions

View file

@ -1598,7 +1598,7 @@ _Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
if (a->ob_shash == -1) {
/* Can't fail */
a->ob_shash = _Py_HashBytes(a->ob_sval, Py_SIZE(a));
a->ob_shash = Py_HashBuffer(a->ob_sval, Py_SIZE(a));
}
return a->ob_shash;
_Py_COMP_DIAG_POP