diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-23 16:20:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-23 16:20:50 (GMT) |
commit | 8035bc5c048ff08f652649754eb8ea769337afa0 (patch) | |
tree | 82778e9f0242d5a26e4ceba5d5b85babde6c12cf /Objects/longobject.c | |
parent | 2b9af63b4f4757cccad70b76960cfe8c7b9e6a49 (diff) | |
download | cpython-8035bc5c048ff08f652649754eb8ea769337afa0.zip cpython-8035bc5c048ff08f652649754eb8ea769337afa0.tar.gz cpython-8035bc5c048ff08f652649754eb8ea769337afa0.tar.bz2 |
follow up to #9778: define and use an unsigned hash type
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index cf7eb2c..b9ce388 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2555,7 +2555,7 @@ long_richcompare(PyObject *self, PyObject *other, int op) static Py_hash_t long_hash(PyLongObject *v) { - unsigned long x; + Py_uhash_t x; Py_ssize_t i; int sign; @@ -2604,8 +2604,8 @@ long_hash(PyLongObject *v) x -= _PyHASH_MODULUS; } x = x * sign; - if (x == (unsigned long)-1) - x = (unsigned long)-2; + if (x == (Py_uhash_t)-1) + x = (Py_uhash_t)-2; return (Py_hash_t)x; } |