From eddcb3bae10f057a1483386d8fc17487b03d9145 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 11 Sep 1996 20:22:48 +0000 Subject: Multiply by 1000003 instead of 3 in string hach --- Objects/stringobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 1e11c50..3dfe115 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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; -- cgit v0.12