From: Victor Stinner Date: Mon, 25 Nov 2013 23:26:23 +0000 (+0100) Subject: Issue #18874: tracemalloc: explain the purpose of get_traces.tracebacks in a comment X-Git-Tag: v3.4.0b2~479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de2f132a5e052b8621be4b5a482a27a0b999fc35;p=thirdparty%2FPython%2Fcpython.git Issue #18874: tracemalloc: explain the purpose of get_traces.tracebacks in a comment --- diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 4cbbd9ed6b32..7e9f69845d06 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -1041,6 +1041,8 @@ py_tracemalloc_get_traces(PyObject *self, PyObject *obj) if (!tracemalloc_config.tracing) return get_traces.list; + /* the traceback hash table is used temporarily to intern traceback tuple + of (filename, lineno) tuples */ get_traces.tracebacks = hashtable_new(sizeof(PyObject *), _Py_hashtable_hash_ptr, _Py_hashtable_compare_direct);