diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-04 07:26:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 07:26:25 (GMT) |
commit | 1177897551066c1e8c394809152614a6483f9ce7 (patch) | |
tree | 62a6fbb373e0bf83932bc192caaaa8cf321bd3de /Python/pyhash.c | |
parent | 6be55f1bedcd076c12d00bf061bbcffc4ed8073a (diff) | |
download | cpython-1177897551066c1e8c394809152614a6483f9ce7.zip cpython-1177897551066c1e8c394809152614a6483f9ce7.tar.gz cpython-1177897551066c1e8c394809152614a6483f9ce7.tar.bz2 |
[3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)
gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214)
(cherry picked from commit f6da790122fdae1a28f444edfbb55202d6829cd1)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Python/pyhash.c')
-rw-r--r-- | Python/pyhash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pyhash.c b/Python/pyhash.c index d508d78..5263622 100644 --- a/Python/pyhash.c +++ b/Python/pyhash.c @@ -263,12 +263,12 @@ fnv(const void *src, Py_ssize_t len) x ^= (Py_uhash_t) *p << 7; while (blocks--) { PY_UHASH_CPY(block.bytes, p); - x = (_PyHASH_MULTIPLIER * x) ^ block.value; + x = (PyHASH_MULTIPLIER * x) ^ block.value; p += SIZEOF_PY_UHASH_T; } /* add remainder */ for (; remainder > 0; remainder--) - x = (_PyHASH_MULTIPLIER * x) ^ (Py_uhash_t) *p++; + x = (PyHASH_MULTIPLIER * x) ^ (Py_uhash_t) *p++; x ^= (Py_uhash_t) len; x ^= (Py_uhash_t) _Py_HashSecret.fnv.suffix; if (x == (Py_uhash_t) -1) { |