mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
bpo-36900: Replace global conf vars with config (GH-13299)
Replace global configuration variables with core_config read from the current interpreter. Cleanup dynload_hpux.c.
This commit is contained in:
parent
3c93153f7d
commit
c96be811fa
9 changed files with 51 additions and 37 deletions
|
@ -150,12 +150,13 @@ init_importlib(PyInterpreterState *interp, PyObject *sysmod)
|
|||
PyObject *importlib;
|
||||
PyObject *impmod;
|
||||
PyObject *value;
|
||||
int verbose = interp->core_config.verbose;
|
||||
|
||||
/* Import _importlib through its frozen version, _frozen_importlib. */
|
||||
if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
|
||||
return _Py_INIT_ERR("can't import _frozen_importlib");
|
||||
}
|
||||
else if (Py_VerboseFlag) {
|
||||
else if (verbose) {
|
||||
PySys_FormatStderr("import _frozen_importlib # frozen\n");
|
||||
}
|
||||
importlib = PyImport_AddModule("_frozen_importlib");
|
||||
|
@ -175,7 +176,7 @@ init_importlib(PyInterpreterState *interp, PyObject *sysmod)
|
|||
if (impmod == NULL) {
|
||||
return _Py_INIT_ERR("can't import _imp");
|
||||
}
|
||||
else if (Py_VerboseFlag) {
|
||||
else if (verbose) {
|
||||
PySys_FormatStderr("import _imp # builtin\n");
|
||||
}
|
||||
if (_PyImport_SetModuleString("_imp", impmod) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue