summaryrefslogtreecommitdiffstats
path: root/Python/pyhash.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-05-21 17:51:51 (GMT)
committerGitHub <noreply@github.com>2024-05-21 17:51:51 (GMT)
commitf6da790122fdae1a28f444edfbb55202d6829cd1 (patch)
tree68d3e65a10037dfc6421b70a2f24bbc06d68f285 /Python/pyhash.c
parent87939bd5790accea77c5a81093f16f28d3f0b429 (diff)
downloadcpython-f6da790122fdae1a28f444edfbb55202d6829cd1.zip
cpython-f6da790122fdae1a28f444edfbb55202d6829cd1.tar.gz
cpython-f6da790122fdae1a28f444edfbb55202d6829cd1.tar.bz2
gh-111389: Add PyHASH_MULTIPLIER constant (#119214)
Diffstat (limited to 'Python/pyhash.c')
-rw-r--r--Python/pyhash.c4
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) {