summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2002-12-31 09:51:59 (GMT)
committerJust van Rossum <just@letterror.com>2002-12-31 09:51:59 (GMT)
commitf8b6de168bac1a002cf8931d5f601240d5c1b4d4 (patch)
treef8d93fb26f98e06cefedfee706669c89c07c5e20
parentb456e4f25b933789df253d1e72e3cb83ad5ab998 (diff)
downloadcpython-f8b6de168bac1a002cf8931d5f601240d5c1b4d4.zip
cpython-f8b6de168bac1a002cf8931d5f601240d5c1b4d4.tar.gz
cpython-f8b6de168bac1a002cf8931d5f601240d5c1b4d4.tar.bz2
- added missing decref
- whitespace normalization
-rw-r--r--Modules/zipimport.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index c8f7e34..11b5dd3 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -174,6 +174,7 @@ zipimporter_dealloc(ZipImporter *self)
{
PyObject_GC_UnTrack(self);
Py_XDECREF(self->archive);
+ Py_XDECREF(self->prefix);
Py_XDECREF(self->files);
self->ob_type->tp_free((PyObject *)self);
}
@@ -1025,9 +1026,9 @@ get_mtime_of_source(ZipImporter *self, char *path)
toc_entry = PyDict_GetItemString(self->files, path);
if (toc_entry != NULL && PyTuple_Check(toc_entry) &&
PyTuple_Size(toc_entry) == 8) {
- /* fetch the time stamp of the .py file for comparison
- with an embedded pyc time stamp */
- int time, date;
+ /* fetch the time stamp of the .py file for comparison
+ with an embedded pyc time stamp */
+ int time, date;
time = PyInt_AsLong(PyTuple_GetItem(toc_entry, 5));
date = PyInt_AsLong(PyTuple_GetItem(toc_entry, 6));
mtime = parse_dostime(time, date);
@@ -1176,7 +1177,7 @@ initzipimport(void)
if (PyModule_AddObject(mod, "zipimporter",
(PyObject *)&ZipImporter_Type) < 0)
return;
-
+
zip_directory_cache = PyDict_New();
if (zip_directory_cache == NULL)
return;