diff options
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index a7774e2fd1..1b412580dc 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -36,6 +36,16 @@ static Py_ssize_t count_tracked = 0; static void show_track(void) { + PyObject *xoptions, *value; + _Py_IDENTIFIER(showalloccount); + + xoptions = PySys_GetXOptions(); + if (xoptions == NULL) + return; + value = _PyDict_GetItemId(xoptions, &PyId_showalloccount); + if (value != Py_True) + return; + fprintf(stderr, "Tuples created: %" PY_FORMAT_SIZE_T "d\n", count_tracked + count_untracked); fprintf(stderr, "Tuples tracked by the GC: %" PY_FORMAT_SIZE_T |