mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Merge ssize_t branch.
This commit is contained in:
parent
4482929734
commit
18e165558b
102 changed files with 2659 additions and 1677 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue