Merge ssize_t branch.

This commit is contained in:
Martin v. Löwis 2006-02-15 17:27:45 +00:00
parent 4482929734
commit 18e165558b
102 changed files with 2659 additions and 1677 deletions

View file

@ -249,6 +249,7 @@ make_filename(char *prefix, char *name, char *path)
*p = SEP;
}
len += strlen(name);
assert(len < INT_MAX);
return (int)len;
}
@ -808,7 +809,8 @@ get_data(char *archive, PyObject *toc_entry)
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 @@ get_mtime_of_source(ZipImporter *self, char *path)
{
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);