Skip to content

Commit e7c4bf2

Browse files
committed
Minor refactor of frame.c
1 parent d105cac commit e7c4bf2

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Python/frame.c

+4-9
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ _PyFrame_Copy(InterpreterFrame *src, InterpreterFrame *dest)
5252
memcpy(dest, src, size);
5353
}
5454

55-
static inline void
56-
clear_specials(InterpreterFrame *frame)
57-
{
58-
Py_XDECREF(frame->frame_obj);
59-
Py_XDECREF(frame->f_locals);
60-
Py_DECREF(frame->f_func);
61-
Py_DECREF(frame->f_code);
62-
}
6355

6456
static void
6557
take_ownership(PyFrameObject *f, InterpreterFrame *frame)
@@ -110,5 +102,8 @@ _PyFrame_Clear(InterpreterFrame * frame)
110102
for (int i = 0; i < frame->stacktop; i++) {
111103
Py_XDECREF(frame->localsplus[i]);
112104
}
113-
clear_specials(frame);
105+
Py_XDECREF(frame->frame_obj);
106+
Py_XDECREF(frame->f_locals);
107+
Py_DECREF(frame->f_func);
108+
Py_DECREF(frame->f_code);
114109
}

0 commit comments

Comments
 (0)