diff options
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r-- | Objects/listobject.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 7eba61e..8576b7a 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -85,15 +85,10 @@ static size_t count_reuse = 0; static void show_alloc(void) { - 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; + } fprintf(stderr, "List allocations: %" PY_FORMAT_SIZE_T "d\n", count_alloc); |