diff options
| author | Guido van Rossum <guido@python.org> | 1996-09-11 20:22:48 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1996-09-11 20:22:48 +0000 |
| commit | eddcb3bae10f057a1483386d8fc17487b03d9145 (patch) | |
| tree | 04adff753a215fd53cd005244aeecd58820f6379 /Objects/stringobject.c | |
| parent | b23a60fd6ef357bb279e8525d9b3042cfb886b94 (diff) | |
| download | cpython-git-eddcb3bae10f057a1483386d8fc17487b03d9145.tar.gz | |
Multiply by 1000003 instead of 3 in string hach
Diffstat (limited to 'Objects/stringobject.c')
| -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 1e11c503cb..3dfe115487 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; |
