diff --git a/_imaging.c b/_imaging.c index 986f221e4..6785578c6 100644 --- a/_imaging.c +++ b/_imaging.c @@ -2985,7 +2985,7 @@ _getattr_bands(ImagingObject* self, void* closure) static PyObject* _getattr_id(ImagingObject* self, void* closure) { - return PyInt_FromLong((long) self->image); + return PyInt_FromSsize_t((Py_ssize_t) self->image); } static PyObject*