Mercurial > cpython-lru_cache-weakref
diff Objects/tupleobject.c @ 74415:050c07b31192 3.2
Consolidate the occurrances of the prime used as the multiplier when hashing
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
| author | Gregory P. Smith <greg@krypto.org> |
|---|---|
| date | Sat, 14 Jan 2012 15:31:34 -0800 |
| parents | ed0e85efac47 |
| children | f34ac2e9d5cf 40e1be1e0707 |
line wrap: on
line diff
--- a/Objects/tupleobject.c Sat Jan 14 22:23:27 2012 +0100 +++ b/Objects/tupleobject.c Sat Jan 14 15:31:34 2012 -0800 @@ -315,7 +315,7 @@ register Py_hash_t x, y; register Py_ssize_t len = Py_SIZE(v); register PyObject **p; - Py_hash_t mult = 1000003L; + Py_hash_t mult = _PyHASH_MULTIPLIER; x = 0x345678L; p = v->ob_item; while (--len >= 0) {
