Embeded python memory leaks

2008-04-22 Thread Prémon Nom
HiI'am a member of a team which try to integrate python in one of our software but something is terribly wrong with it.  the python C Api forgot (or do it intentionnaly ?)  to release a lot of memory when Py_finalize() is calledeven with a simple :int main(){ Py_initialize(); Py_finalize();

Getting the current PyCFunction while in a python function

2009-08-26 Thread Prémon Nom
Hi I would like to get the PyCFunction object which corresponds to the current function which is executed. I call PyFrameObject* frame = PyEval_GetFrame() 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