Skip to content

Commit de2f132

Browse files
committed
Issue python#18874: tracemalloc: explain the purpose of get_traces.tracebacks in a comment
1 parent 49c96fb commit de2f132

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_tracemalloc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,8 @@ py_tracemalloc_get_traces(PyObject *self, PyObject *obj)
10411041
if (!tracemalloc_config.tracing)
10421042
return get_traces.list;
10431043

1044+
/* the traceback hash table is used temporarily to intern traceback tuple
1045+
of (filename, lineno) tuples */
10441046
get_traces.tracebacks = hashtable_new(sizeof(PyObject *),
10451047
_Py_hashtable_hash_ptr,
10461048
_Py_hashtable_compare_direct);

0 commit comments

Comments
 (0)