summaryrefslogtreecommitdiff
path: root/Objects/genobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 66c6ccba0c..071def8a25 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1117,11 +1117,11 @@ compute_cr_origin(int origin_depth)
}
frame = PyEval_GetFrame();
for (int i = 0; i < frame_count; ++i) {
- PyObject *frameinfo = Py_BuildValue(
- "OiO",
- frame->f_code->co_filename,
- PyFrame_GetLineNumber(frame),
- frame->f_code->co_name);
+ PyCodeObject *code = frame->f_code;
+ PyObject *frameinfo = Py_BuildValue("OiO",
+ code->co_filename,
+ PyFrame_GetLineNumber(frame),
+ code->co_name);
if (!frameinfo) {
Py_DECREF(cr_origin);
return NULL;