summaryrefslogtreecommitdiffstats
path: root/Python/traceback.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index a58df04..c5787b5 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -785,7 +785,7 @@ tb_displayline(PyTracebackObject* tb, PyObject *f, PyObject *filename, int linen
}
int code_offset = tb->tb_lasti;
- PyCodeObject* code = frame->f_frame->f_code;
+ PyCodeObject* code = _PyFrame_GetCode(frame->f_frame);
const Py_ssize_t source_line_len = PyUnicode_GET_LENGTH(source_line);
int start_line;
@@ -1164,7 +1164,7 @@ done:
static void
dump_frame(int fd, _PyInterpreterFrame *frame)
{
- PyCodeObject *code = frame->f_code;
+ PyCodeObject *code =_PyFrame_GetCode(frame);
PUTS(fd, " File ");
if (code->co_filename != NULL
&& PyUnicode_Check(code->co_filename))