summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-18 22:34:46 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-18 22:34:46 (GMT)
commit9e40fad193d8d8365215cf0c23fed990ff0bed9b (patch)
tree6c817eff007a0f7a2d1fff4bb435f85efca28ea8
parent965a8a1c5b27e81bba6eac11017207e4202125e3 (diff)
downloadcpython-9e40fad193d8d8365215cf0c23fed990ff0bed9b.zip
cpython-9e40fad193d8d8365215cf0c23fed990ff0bed9b.tar.gz
cpython-9e40fad193d8d8365215cf0c23fed990ff0bed9b.tar.bz2
zipimport: document archive encoding; fix indentation
-rw-r--r--Modules/zipimport.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index d58d4fe..ac6d45e 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -35,7 +35,8 @@ typedef struct _zipimporter ZipImporter;
struct _zipimporter {
PyObject_HEAD
- PyObject *archive; /* pathname of the Zip archive */
+ PyObject *archive; /* pathname of the Zip archive,
+ decoded from the filesystem encoding */
PyObject *prefix; /* file prefix: "a/sub/directory/",
encoded to the filesystem encoding */
PyObject *files; /* dict with file info {path: toc_entry} */
@@ -70,7 +71,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
return -1;
if (!PyArg_ParseTuple(args, "O&:zipimporter",
- PyUnicode_FSDecoder, &pathobj))
+ PyUnicode_FSDecoder, &pathobj))
return -1;
/* copy path to buf */
@@ -385,7 +386,7 @@ zipimporter_get_filename(PyObject *obj, PyObject *args)
int ispackage;
if (!PyArg_ParseTuple(args, "s:zipimporter.get_filename",
- &fullname))
+ &fullname))
return NULL;
/* Deciding the filename requires working out where the code