bpo-25711: Rewrite zipimport in pure Python. (GH-6809)

This commit is contained in:
Serhiy Storchaka 2018-09-18 22:22:29 +03:00 committed by GitHub
parent 4ba3b50bfe
commit 79d1c2e6c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 2998 additions and 3408 deletions

View file

@ -191,7 +191,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod)
PyObject *importlib;
PyObject *impmod;
PyObject *value;
_PyInitError err;
/* Import _importlib through its frozen version, _frozen_importlib. */
if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
@ -233,11 +232,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod)
Py_DECREF(value);
Py_DECREF(impmod);
err = _PyImportZip_Init();
if (_Py_INIT_FAILED(err)) {
return err;
}
return _Py_INIT_OK();
}
@ -252,7 +246,7 @@ initexternalimport(PyInterpreterState *interp)
return _Py_INIT_ERR("external importer setup failed");
}
Py_DECREF(value);
return _Py_INIT_OK();
return _PyImportZip_Init();
}
/* Helper functions to better handle the legacy C locale