aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index eab85c08fc0..98f0b383872 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -946,7 +946,7 @@ frame_sizeof(PyFrameObject *f, PyObject *Py_UNUSED(ignored))
Py_ssize_t res;
res = offsetof(PyFrameObject, _f_frame_data) + offsetof(_PyInterpreterFrame, localsplus);
PyCodeObject *code = f->f_frame->f_code;
- res += (code->co_nlocalsplus+code->co_stacksize) * sizeof(PyObject *);
+ res += _PyFrame_NumSlotsForCodeObject(code) * sizeof(PyObject *);
return PyLong_FromSsize_t(res);
}