]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
zipimport: document archive encoding; fix indentation
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 18 Oct 2010 22:34:46 +0000 (22:34 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 18 Oct 2010 22:34:46 +0000 (22:34 +0000)
Modules/zipimport.c

index d58d4fecc062f451bdeb7241fd2399d91fcb39d1..ac6d45edc7d00b9c104c0ad229baa92c8477fb9e 100644 (file)
@@ -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