mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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
This commit is contained in:
parent
09f3a8a124
commit
25420fe290
9 changed files with 41 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue