summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-21 02:12:22 (GMT)
committerGitHub <noreply@github.com>2017-11-21 02:12:22 (GMT)
commit25420fe290b98171e6d30edf9350292c21ef700e (patch)
tree265d725ef6c341501f38873266c91e7461fd0364 /Python/import.c
parent09f3a8a1249308a104a89041d82fe99e6c087043 (diff)
downloadcpython-25420fe290b98171e6d30edf9350292c21ef700e.zip
cpython-25420fe290b98171e6d30edf9350292c21ef700e.tar.gz
cpython-25420fe290b98171e6d30edf9350292c21ef700e.tar.bz2
bpo-32030: Add more options to _PyCoreConfig (#4485)
Py_Main() now handles two more -X options: * -X showrefcount: new _PyCoreConfig.show_ref_count field * -X showalloccount: new _PyCoreConfig.show_alloc_count field
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index fef6398..d2ed785 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1674,8 +1674,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
}
}
else {
- /* 1 -- true, 0 -- false, -1 -- not initialized */
- int importtime = interp->core_config.importtime;
+ int import_time = interp->core_config.import_time;
static int import_level;
static _PyTime_t accumulated;
@@ -1686,7 +1685,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
* Anyway, importlib._find_and_load is much slower than
* _PyDict_GetItemIdWithError().
*/
- if (importtime) {
+ if (import_time) {
static int header = 1;
if (header) {
fputs("import time: self [us] | cumulative | imported package\n",
@@ -1712,7 +1711,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
PyDTrace_IMPORT_FIND_LOAD_DONE(PyUnicode_AsUTF8(abs_name),
mod != NULL);
- if (importtime) {
+ if (import_time) {
_PyTime_t cum = _PyTime_GetPerfCounter() - t1;
import_level--;