Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Do not check co_cell2arg if a free var.
  • Loading branch information
ericsnowcurrently committed Jun 8, 2021
commit 5107da7c190a46eaf810afe650f3092199100a88
3 changes: 2 additions & 1 deletion Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear)
}
PyObject *oldvalue = fast[i];
int cellargoffset = CO_CELL_NOT_AN_ARG;
if (co->co_cell2arg != NULL) {
if (kind & CO_FAST_CELL && co->co_cell2arg != NULL) {
assert(i >= co->co_nlocals);
cellargoffset = co->co_cell2arg[i - co->co_nlocals];
}
PyObject *cell = NULL;
Expand Down