Issue #9566: use Py_ssize_t instead of int
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index c83639c..dea682d 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -800,7 +800,7 @@
     PyObject *arg = NULL;
     PyObject *bytes = NULL;
     PyObject *str = NULL;
-    int len = -1;
+    Py_ssize_t len = -1;
     char *ptr;
 
     if ((bytes = PyLong_FromLong(buf_size)) == NULL)
@@ -831,7 +831,7 @@
     if (len > buf_size) {
         PyErr_Format(PyExc_ValueError,
                      "read() returned too much data: "
-                     "%i bytes requested, %i returned",
+                     "%i bytes requested, %zi returned",
                      buf_size, len);
         goto finally;
     }
@@ -839,7 +839,7 @@
 finally:
     Py_XDECREF(arg);
     Py_XDECREF(str);
-    return len;
+    return (int)len;
 }
 
 PyDoc_STRVAR(xmlparse_ParseFile__doc__,
@@ -1807,7 +1807,7 @@
         Py_XDECREF(rev_codes_dict);
         return NULL;
     }
-    
+
 #define MYCONST(name) \
     if (PyModule_AddStringConstant(errors_module, #name,               \
                                    (char *)XML_ErrorString(name)) < 0) \
@@ -1873,7 +1873,7 @@
         return NULL;
     if (PyModule_AddObject(errors_module, "messages", rev_codes_dict) < 0)
         return NULL;
-    
+
 #undef MYCONST
 
 #define MYCONST(c) PyModule_AddIntConstant(m, #c, c)