mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
python get line number/profier fix
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
extern struct uwsgi_server uwsgi;
|
||||
|
||||
#ifndef PyFrame_GetLineNumber
|
||||
static int PyFrame_GetLineNumber(PyFrameObject *frame) {
|
||||
return frame->f_lineno;
|
||||
int PyFrame_GetLineNumber(PyFrameObject *frame) {
|
||||
if (frame->f_trace) {
|
||||
return frame->f_lineno;
|
||||
}
|
||||
else {
|
||||
return PyCode_Addr2Line(frame->f_code, frame->f_lasti);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user