Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 76562:8dab93ec19de
Issue #14605: Insert to the front of sys.path_hooks instead of appending.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Tue, 24 Apr 2012 22:03:46 -0400 |
| parents | 085cf1480cfe |
| children | 1439e2d1f490 |
line wrap: on
line diff
--- a/Python/import.c Wed Apr 25 02:31:37 2012 +0200 +++ b/Python/import.c Tue Apr 24 22:03:46 2012 -0400 @@ -268,8 +268,8 @@ "# can't import zipimport.zipimporter\n"); } else { - /* sys.path_hooks.append(zipimporter) */ - err = PyList_Append(path_hooks, zipimporter); + /* sys.path_hooks.insert(0, zipimporter) */ + err = PyList_Insert(path_hooks, 0, zipimporter); Py_DECREF(zipimporter); if (err < 0) { goto error;
