diff options
author | Gregory P. Smith <greg@krypto.org> | 2012-01-14 23:31:34 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2012-01-14 23:31:34 (GMT) |
commit | 63e6c3222f563cfb156de6e92199e9e35ad5d832 (patch) | |
tree | af145dbe59f9ec446a9892e94064bf6b989c4086 /Objects/unicodeobject.c | |
parent | 515687a7eda26d733c747e08205a1d861bc70673 (diff) | |
download | cpython-63e6c3222f563cfb156de6e92199e9e35ad5d832.zip cpython-63e6c3222f563cfb156de6e92199e9e35ad5d832.tar.gz cpython-63e6c3222f563cfb156de6e92199e9e35ad5d832.tar.bz2 |
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).
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c4cfe1b..20528b9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7666,7 +7666,7 @@ unicode_hash(PyUnicodeObject *self) p = self->str; x = *p << 7; while (--len >= 0) - x = (1000003*x) ^ *p++; + x = (_PyHASH_MULTIPLIER*x) ^ *p++; x ^= Py_SIZE(self); if (x == -1) x = -2; |