diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-21 02:12:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 02:12:22 (GMT) |
commit | 25420fe290b98171e6d30edf9350292c21ef700e (patch) | |
tree | 265d725ef6c341501f38873266c91e7461fd0364 /Python/pylifecycle.c | |
parent | 09f3a8a1249308a104a89041d82fe99e6c087043 (diff) | |
download | cpython-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/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 14fe75e..36fcf61 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1101,10 +1101,6 @@ Py_FinalizeEx(void) /* nothing */; #endif -#ifdef Py_REF_DEBUG - PyObject *showrefcount = _PyDebug_XOptionShowRefCount(); -#endif - /* Destroy all modules */ PyImport_Cleanup(); @@ -1153,8 +1149,9 @@ Py_FinalizeEx(void) _PyHash_Fini(); #ifdef Py_REF_DEBUG - if (showrefcount == Py_True) - _PyDebug_PrintTotalRefs(); + if (interp->core_config.show_ref_count) { + _PyDebug_PrintTotalRefs(); + } #endif #ifdef Py_TRACE_REFS |