8000 Remove redundant `_PyFrame_GetCode` by WolframAlph · Pull Request #113217 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Remove redundant _PyFrame_GetCode #113217

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove redundant _PyFrame_GetCode
  • Loading branch information
WolframAlph committed Dec 16, 2023
commit ab73c34f285a6c6f7cc8c7646205069a24032ab9
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -10450,7 +10450,7 @@ super_init_without_args(_PyInterpreterFrame *cframe, PyCodeObject *co,
return -1;
}

assert(_PyFrame_GetCode(cframe)->co_nlocalsplus > 0);
assert(co->co_nlocalsplus > 0);
PyObject *firstarg = _PyFrame_GetLocalsArray(cframe)[0];
// The first argument might be a cell.
if (firstarg != NULL && (_PyLocals_GetKind(co->co_localspluskinds, 0) & CO_FAST_CELL)) {
Expand Down
0