summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-10-23 16:20:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-10-23 16:20:50 (GMT)
commit8035bc5c048ff08f652649754eb8ea769337afa0 (patch)
tree82778e9f0242d5a26e4ceba5d5b85babde6c12cf /Objects/longobject.c
parent2b9af63b4f4757cccad70b76960cfe8c7b9e6a49 (diff)
downloadcpython-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.c6
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;
}