Le jeudi 10 février 2011 à 17:25 +0000, Mark Shannon a écrit : > What about this one then, > > PyFrame_GetLineNumber was added because people were using > PyCode_Addr2Line to get the current line number. > > The API will contain then both > PyFrame_GetLineNumber *and* PyCode_Addr2Line. > The API then has even more redundancy. > > PyObject_GetAttrString(frame, "f_lineno") should do the job. Not exactly: int PyFrame_GetLineNumber(PyFrameObject *f) { if (f->f_trace) return f->f_lineno; else return PyCode_Addr2Line(f->f_code, f->f_lasti); } Victor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4