diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/Objects/object.c b/Objects/object.c index ed8a62a..674180d 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -29,17 +29,6 @@ _Py_GetRefTotal(void) return total; } -PyObject * -_PyDebug_XOptionShowRefCount(void) -{ - PyObject *xoptions = PySys_GetXOptions(); - if (xoptions == NULL) - return NULL; - - _Py_IDENTIFIER(showrefcount); - return _PyDict_GetItemId(xoptions, &PyId_showrefcount); -} - void _PyDebug_PrintTotalRefs(void) { fprintf(stderr, @@ -106,16 +95,10 @@ extern Py_ssize_t null_strings, one_strings; void dump_counts(FILE* f) { - PyTypeObject *tp; - PyObject *xoptions, *value; - _Py_IDENTIFIER(showalloccount); - - xoptions = PySys_GetXOptions(); - if (xoptions == NULL) - return; - value = _PyDict_GetItemId(xoptions, &PyId_showalloccount); - if (value != Py_True) + PyInterpreterState *interp = PyThreadState_GET()->interp; + if (!inter->core_config.show_alloc_count) { return; + } for (tp = type_list; tp; tp = tp->tp_next) fprintf(f, "%s alloc'd: %" PY_FORMAT_SIZE_T "d, " |