8000 GH-100719: Remove redundant `gi_code` field from generator object. by markshannon · Pull Request #100749 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-100719: Remove redundant gi_code field from generator object. #100749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 23, 2023
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.
0