Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
I am replacing issue6697-lsprof.diff with a (hopefully) more carefully written version that addresses the issues that Victor noted. Victor, I take your comment as +1 for adding PyModule_GetNameObject(). I started looking into adding unit tests that would exercise this code, but is does not seem possible to trigger the fn->m_self == NULL condition. According to the comment in the code, this is supposed to be the case when fn is a builtin function, but I observe the following in the debugger when running test_cprofile: (gdb) pyo fn object : <built-in function exec> type : builtin_function_or_method refcount: 4 address : 0x10038c678 $5 = void (gdb) pyo fn->m_self object : <module 'builtins' (built-in)> type : module refcount: 51 address : 0x100388ee8 $6 = void ---------- Added file: http://bugs.python.org/file20397/issue6697-lsprof.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6697> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com