Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed May 9, 2023
1 parent 76077cd commit a8425a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
}

static int
is_free_in_children(PySTEntryObject *entry, PyObject *key) {
is_free_in_any_child(PySTEntryObject *entry, PyObject *key) {
for (Py_ssize_t i = 0; i < PyList_GET_SIZE(entry->ste_children); i++) {
PySTEntryObject *child_ste = (PySTEntryObject *)PyList_GET_ITEM(
entry->ste_children, i);
Expand Down Expand Up @@ -608,7 +608,7 @@ inline_comprehension(PySTEntryObject *ste, PySTEntryObject *comp,
// free vars in comprehension that are locals in outer scope can
// now simply be locals, unless they are free in comp children
if ((PyLong_AsLong(existing) & DEF_BOUND) &&
!is_free_in_children(comp, k)) {
!is_free_in_any_child(comp, k)) {
if (PySet_Discard(comp_free, k) < 0) {
return 0;
}
Expand Down

0 comments on commit a8425a6

Please sign in to comment.