Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into trim-code-object-2
  • Loading branch information
markshannon committed Jan 4, 2023
commit d891db9884f016e33430a085fdee41d4e3e5e2ac
2 changes: 1 addition & 1 deletion Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ gen_sizeof(PyGenObject *gen, PyObject *Py_UNUSED(ignored))
Py_ssize_t res;
res = offsetof(PyGenObject, gi_iframe) + offsetof(_PyInterpreterFrame, localsplus);
PyCodeObject *code = _PyGen_GetCode(gen);
res += (code->co_nlocalsplus+code->co_stacksize) * sizeof(PyObject *);
res += _PyFrame_NumSlotsForCodeObject(code) * sizeof(PyObject *);
return PyLong_FromSsize_t(res);
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.