]> granicus.if.org Git - python/commit
Refactor common code out of globaltrace_trackcallers() and
authorSkip Montanaro <skip@pobox.com>
Sat, 10 Apr 2004 16:29:58 +0000 (16:29 +0000)
committerSkip Montanaro <skip@pobox.com>
Sat, 10 Apr 2004 16:29:58 +0000 (16:29 +0000)
commit5bfd98498a868e13834603f966a3ff51c883e8ac
treec690d40e896e205cd6dc795ae147e5c61fed656b
parent6b3b046ab0a0fae6ad50cbb0e1fe4b28f5f7f957
Refactor common code out of globaltrace_trackcallers() and
globaltrace_countfuncs() into file_module_function_of().

In that function use Michael Hudson's suggestion of gc.get_referrers() to
back up from the code object to a function, then to a class's dict and
finally to a class object if one exists.
Lib/trace.py