Skip to content
Open
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
3 changes: 2 additions & 1 deletion Objects/odictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,13 +2206,14 @@ update __setitem__
static int
mutablemapping_add_pairs(PyObject *self, PyObject *pairs)
{
assert(!PyErr_Occurred());

PyObject *pair, *iterator, *unexpected;
int res = 0;

iterator = PyObject_GetIter(pairs);
if (iterator == NULL)
return -1;
PyErr_Clear();

while ((pair = PyIter_Next(iterator)) != NULL) {
/* could be more efficient (see UNPACK_SEQUENCE in ceval.c) */
Expand Down
Loading