Issue #9566: use Py_ssize_t instead of int
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 54c23ae..e9cae13 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -492,7 +492,7 @@
 int
 PyCode_Addr2Line(PyCodeObject *co, int addrq)
 {
-    int size = PyBytes_Size(co->co_lnotab) / 2;
+    Py_ssize_t size = PyBytes_Size(co->co_lnotab) / 2;
     unsigned char *p = (unsigned char*)PyBytes_AsString(co->co_lnotab);
     int line = co->co_firstlineno;
     int addr = 0;
@@ -510,7 +510,8 @@
 int
 _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
 {
-    int size, addr, line;
+    Py_ssize_t size;
+    int addr, line;
     unsigned char* p;
 
     p = (unsigned char*)PyBytes_AS_STRING(co->co_lnotab);
diff --git a/Objects/listobject.c b/Objects/listobject.c
index bcc6bc0..2e0c8aa 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1381,7 +1381,7 @@
 
 /* Conceptually a MergeState's constructor. */
 static void
-merge_init(MergeState *ms, int list_size, int has_keyfunc)
+merge_init(MergeState *ms, Py_ssize_t list_size, int has_keyfunc)
 {
     assert(ms != NULL);
     if (has_keyfunc) {
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index a5863dd..1fefe84 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2325,7 +2325,7 @@
     res->ht_type.tp_basicsize = spec->basicsize;
     res->ht_type.tp_itemsize = spec->itemsize;
     res->ht_type.tp_flags = spec->flags | Py_TPFLAGS_HEAPTYPE;
-    
+
     for (slot = spec->slots; slot->slot; slot++) {
 	if (slot->slot >= sizeof(slotoffsets)/sizeof(slotoffsets[0])) {
 	    PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
@@ -2335,7 +2335,7 @@
     }
 
     return (PyObject*)res;
-    
+
  fail:
     Py_DECREF(res);
     return NULL;
@@ -6202,7 +6202,7 @@
            and first local variable on the stack. */
         PyFrameObject *f = PyThreadState_GET()->frame;
         PyCodeObject *co = f->f_code;
-        int i, n;
+        Py_ssize_t i, n;
         if (co == NULL) {
             PyErr_SetString(PyExc_SystemError,
                             "super(): no code object");