diff options
Diffstat (limited to 'Objects/enumobject.c')
-rw-r--r-- | Objects/enumobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/enumobject.c b/Objects/enumobject.c index e6e5bc5..ea85e3c 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -159,14 +159,14 @@ PyTypeObject PyEnum_Type = { typedef struct { PyObject_HEAD - long index; + Py_ssize_t index; PyObject* seq; } reversedobject; static PyObject * reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - long n; + Py_ssize_t n; PyObject *seq; reversedobject *ro; @@ -249,7 +249,7 @@ reversed_len(reversedobject *ro) if (seqsize == -1) return NULL; position = ro->index + 1; - return PyInt_FromLong((seqsize < position) ? 0 : position); + return PyInt_FromSsize_t((seqsize < position) ? 0 : position); } PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); |