Message126216
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 |
|
Date |
User |
Action |
Args |
2011-01-13 23:05:32 | belopolsky | set | recipients:
+ belopolsky, lemburg, loewis, jafo, ronaldoussoren, amaury.forgeotdarc, vstinner, ezio.melotti, Arfrever |
2011-01-13 23:05:32 | belopolsky | set | messageid: <1294959932.55.0.965366560451.issue6697@psf.upfronthosting.co.za> |
2011-01-13 23:05:28 | belopolsky | link | issue6697 messages |
2011-01-13 23:05:28 | belopolsky | create | |
|