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
Fail if there was an error.
  • Loading branch information
ericsnowcurrently committed May 27, 2021
commit b36ca68d6f54a807c5688cd0a3166b7fbd7aeaea
5 changes: 4 additions & 1 deletion Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ _PyCode_New(struct _PyCodeConstructor *con)
for (int j = 0; j < totalargs; j++) {
PyObject *argname = PyTuple_GET_ITEM(co->co_varnames, j);
int cmp = PyUnicode_Compare(cellname, argname);
assert(cmp != -1 || !PyErr_Occurred());
if (cmp == -1 && PyErr_Occurred()) {
Py_DECREF(co);
return NULL;
}
if (cmp == 0) {
if (co->co_cell2arg == NULL) {
co->co_cell2arg = PyMem_NEW(int, ncellvars);
Expand Down