Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 74416:40e1be1e0707
Consolidate the occurrances of the prime used as the multiplier when hashing.
| author | Gregory P. Smith <greg@krypto.org> |
|---|---|
| date | Sat, 14 Jan 2012 15:45:13 -0800 |
| parents | 9cd5e8ee1d02 050c07b31192 |
| children | c3972c4d7edb |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Sat Jan 14 15:09:07 2012 -0800 +++ b/Objects/unicodeobject.c Sat Jan 14 15:45:13 2012 -0800 @@ -11210,7 +11210,7 @@ #define HASH(P) \ x = (Py_uhash_t)*P << 7; \ while (--len >= 0) \ - x = (1000003*x) ^ (Py_uhash_t)*P++; + x = (_PyHASH_MULTIPLIER*x) ^ (Py_uhash_t)*P++; switch (PyUnicode_KIND(self)) { case PyUnicode_1BYTE_KIND: {
