Kaydet (Commit) eddcb3ba authored tarafından Guido van Rossum's avatar Guido van Rossum

Multiply by 1000003 instead of 3 in string hach

üst b23a60fd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment