diff --git a/decode.c b/decode.c index 58ba396a4..df71658f6 100644 --- a/decode.c +++ b/decode.c @@ -938,7 +938,7 @@ _imaging_tell_pyFd(PyObject *fd) Py_ssize_t location; result = PyObject_CallMethod(fd, "tell", NULL); - location = PyInt_AsSsize_t(result); + location = PyLong_AsSsize_t(result); Py_DECREF(result); return location;