<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv763600831"><div id="yiv484036303">Hi<br><br>I would like to get the PyCFunction object which corresponds to the current function which is executed. I call PyFrameObject* frame = PyEval_GetFrame()<br><br>I try to parse frame->f_valuestack, but I don't know how to get the index of the function in the stack or event the size of the stack to be able to parse it (from end to begin and to stop on the first PyCFunctionObject).<br>There is a member call stack size (frame->f_valuestack->f_code->co_stacksize) but it doesn't correspond to the frame->f_valuestack size :-(<br>In fact i know that when i call "print(myFunctionPrintNumber(123))<br>There is PyCfunctionObject corresponding to myFunctionPrintNumber but i don't know how to acces it :/ because i don't know how to get/compute frame->f_valuestack size or to get/compute directly
the index where the current executed function is.<br><br>Please help me!!!<br><br>Regards<br></div></div></td></tr></table><br>