Merge ssize_t branch.
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 937b0f7..be141d0 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -249,6 +249,7 @@
*p = SEP;
}
len += strlen(name);
+ assert(len < INT_MAX);
return (int)len;
}
@@ -808,7 +809,8 @@
PyObject *raw_data, *data = NULL, *decompress;
char *buf;
FILE *fp;
- int err, bytes_read = 0;
+ int err;
+ Py_ssize_t bytes_read = 0;
long l;
char *datapath;
long compress, data_size, file_size, file_offset;
@@ -1024,7 +1026,7 @@
{
PyObject *toc_entry;
time_t mtime = 0;
- int lastchar = strlen(path) - 1;
+ Py_ssize_t lastchar = strlen(path) - 1;
char savechar = path[lastchar];
path[lastchar] = '\0'; /* strip 'c' or 'o' from *.py[co] */
toc_entry = PyDict_GetItemString(self->files, path);