Commit a48005b9 authored by Stefan Behnel's avatar Stefan Behnel

fix iteration over misbehaving dict methods

--HG--
extra : transplant_source : %EF%CB8%5D%B9%20%C4%9E%D9%BC8%BD%D9w4%AA%ABk%0B%EB
parent 01b003b1
......@@ -320,11 +320,12 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int keys, int
}
#endif
*p_is_dict = 0;
if (!method_name) {
return PyObject_GetIter(dict);
} else {
return PyObject_CallMethodObjArgs(dict, method_name, NULL);
if (method_name) {
dict = PyObject_CallMethodObjArgs(dict, method_name, NULL);
if (!dict)
return NULL;
}
return PyObject_GetIter(dict);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment