Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e40fad

Browse files
author
Victor Stinner
committed
zipimport: document archive encoding; fix indentation
1 parent 965a8a1 commit 9e40fad

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Modules/zipimport.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ typedef struct _zipimporter ZipImporter;
3535

3636
struct _zipimporter {
3737
PyObject_HEAD
38-
PyObject *archive; /* pathname of the Zip archive */
38+
PyObject *archive; /* pathname of the Zip archive,
39+
decoded from the filesystem encoding */
3940
PyObject *prefix; /* file prefix: "a/sub/directory/",
4041
encoded to the filesystem encoding */
4142
PyObject *files; /* dict with file info {path: toc_entry} */
@@ -70,7 +71,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
7071
return -1;
7172

7273
if (!PyArg_ParseTuple(args, "O&:zipimporter",
73-
PyUnicode_FSDecoder, &pathobj))
74+
PyUnicode_FSDecoder, &pathobj))
7475
return -1;
7576

7677
/* copy path to buf */
@@ -385,7 +386,7 @@ zipimporter_get_filename(PyObject *obj, PyObject *args)
385386
int ispackage;
386387

387388
if (!PyArg_ParseTuple(args, "s:zipimporter.get_filename",
388-
&fullname))
389+
&fullname))
389390
return NULL;
390391

391392
/* Deciding the filename requires working out where the code

0 commit comments

Comments
 (0)