diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 78e5561f2d0..cac23bf3b91 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1268,7 +1268,7 @@ array_array_buffer_info_impl(arrayobject *self) } PyTuple_SET_ITEM(retval, 0, v); - v = PyLong_FromLong((long)(Py_SIZE(self))); + v = PyLong_FromSsize_t(Py_SIZE(self)); if (v == NULL) { Py_DECREF(retval); return NULL;