PYTHON-1010 write_dict now checks the error indicator when exiting iteration loop
This commit is contained in:
parent
2c46afed9b
commit
03f01774fa
@ -1378,6 +1378,9 @@ int write_dict(PyObject* self, buffer_t buffer,
|
||||
Py_DECREF(key);
|
||||
}
|
||||
Py_DECREF(iter);
|
||||
if (PyErr_Occurred()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* write null byte and fill in length */
|
||||
if (!buffer_write_bytes(buffer, &zero, 1)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user