summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index aa3be82..72b79c9 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -312,13 +312,13 @@ Done:
1330111, 1412633, 1165069, 1247599, 1495177, 1577699
*/
-static long
+static Py_hash_t
tuplehash(PyTupleObject *v)
{
- register long x, y;
+ register Py_hash_t x, y;
register Py_ssize_t len = Py_SIZE(v);
register PyObject **p;
- long mult = 1000003L;
+ Py_hash_t mult = 1000003L;
x = 0x345678L;
p = v->ob_item;
while (--len >= 0) {
@@ -327,7 +327,7 @@ tuplehash(PyTupleObject *v)
return -1;
x = (x ^ y) * mult;
/* the cast might truncate len; that doesn't change hash stability */
- mult += (long)(82520L + len + len);
+ mult += (Py_hash_t)(82520L + len + len);
}
x += 97531L;
if (x == -1)
@@ -689,7 +689,7 @@ tuplesubscript(PyTupleObject* self, PyObject* item)
PyObject* it;
PyObject **src, **dest;
- if (PySlice_GetIndicesEx((PySliceObject*)item,
+ if (PySlice_GetIndicesEx(item,
PyTuple_GET_SIZE(self),
&start, &stop, &step, &slicelength) < 0) {
return NULL;