diff options
| author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2018-03-05 21:51:44 +1100 |
|---|---|---|
| committer | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2018-03-05 21:51:44 +1100 |
| commit | f897c69f597d084ebed9d0be3cbdbf5a6f9f12aa (patch) | |
| tree | 0b87dcdc36fb0f0b128c08f6430c5bfc9b532b80 /src/server | |
| parent | dc8190ad240a831cbd8069dbc08d0dce52a7f10f (diff) | |
| download | mod_wsgi-f897c69f597d084ebed9d0be3cbdbf5a6f9f12aa.tar.gz | |
Use alternative to PyFrame_GetLineNumber() so still compiles with Python 2.6 on older RHEL versions.
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/mod_wsgi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c index 375e35f..731ef95 100644 --- a/src/server/mod_wsgi.c +++ b/src/server/mod_wsgi.c @@ -9438,7 +9438,13 @@ static void wsgi_log_stack_traces(void) char *filename = NULL; char *name = NULL; - lineno = PyFrame_GetLineNumber(current); + if (current->f_trace) { + lineno = current->f_lineno; + } + else { + lineno = PyCode_Addr2Line(current->f_code, + current->f_lasti); + } #if PY_MAJOR_VERSION >= 3 filename = PyUnicode_AsUTF8(current->f_code->co_filename); |
