Consolidate the occurrances of the prime used as the multiplier when hashing.

This commit is contained in:
Gregory P. Smith 2012-01-14 15:45:13 -08:00
commit f5b62a9b31
4 changed files with 7 additions and 4 deletions

View file

@ -11210,7 +11210,7 @@ unicode_hash(PyObject *self)
#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: {