diff options
author | Guido van Rossum <guido@python.org> | 1996-09-11 20:22:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-09-11 20:22:48 (GMT) |
commit | eddcb3bae10f057a1483386d8fc17487b03d9145 (patch) | |
tree | 04adff753a215fd53cd005244aeecd58820f6379 /Objects | |
parent | b23a60fd6ef357bb279e8525d9b3042cfb886b94 (diff) | |
download | cpython-eddcb3bae10f057a1483386d8fc17487b03d9145.zip cpython-eddcb3bae10f057a1483386d8fc17487b03d9145.tar.gz cpython-eddcb3bae10f057a1483386d8fc17487b03d9145.tar.bz2 |
Multiply by 1000003 instead of 3 in string hach
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |