mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-20 08:02:26 +01:00
20 lines
821 B
Diff
20 lines
821 B
Diff
https://docs.python.org/uk/3.11/whatsnew/3.11.html changes to pyframe api
|
|
diff --git a/src/mod/languages/mod_python3/mod_python3.c b/src/mod/languages/mod_python3/mod_python3.c
|
|
index 52a3312..6619764 100644
|
|
--- a/src/mod/languages/mod_python3/mod_python3.c
|
|
+++ b/src/mod/languages/mod_python3/mod_python3.c
|
|
@@ -153,10 +153,11 @@ static void print_python_error(const char * script)
|
|
|
|
/* Traceback */
|
|
do {
|
|
+ PyCodeObject *code = PyFrame_GetCode(pyTB->tb_frame);
|
|
sprintf((char*)sTemp, "\n\tFile: \"%s\", line %i, in %s",
|
|
- PyString_AsString(pyTB->tb_frame->f_code->co_filename),
|
|
+ PyString_AsString(code->co_filename),
|
|
pyTB->tb_lineno,
|
|
- PyString_AsString(pyTB->tb_frame->f_code->co_name) );
|
|
+ PyString_AsString(code->co_name) );
|
|
strcat(buffer, (char*)sTemp);
|
|
|
|
pyTB=pyTB->tb_next;
|