mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Multiply by 1000003 instead of 3 in string hach
This commit is contained in:
parent
b23a60fd6e
commit
eddcb3bae1
1 changed files with 1 additions and 1 deletions
|
@ -419,7 +419,7 @@ string_hash(a)
|
|||
p = (unsigned char *) a->ob_sval;
|
||||
x = *p << 7;
|
||||
while (--len >= 0)
|
||||
x = (3*x) ^ *p++;
|
||||
x = (1000003*x) ^ *p++;
|
||||
x ^= a->ob_size;
|
||||
if (x == -1)
|
||||
x = -2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue