Skip to content
Closed
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
Next Next commit
Remove unneeded PyType_Ready() calls
  • Loading branch information
Erlend E. Aasland committed Jan 2, 2021
commit adbde61c3deb2bcd4d325361f6158f101767c4eb
6 changes: 0 additions & 6 deletions Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3424,8 +3424,6 @@ accumulate_reduce(accumulateobject *lz, PyObject *Py_UNUSED(ignored))
PyObject *it;

assert(lz->total == NULL);
if (PyType_Ready(state->chain_type) < 0)
return NULL;
it = PyObject_CallFunction((PyObject *)state->chain_type, "(O)O",
lz->initial, lz->it);
if (it == NULL)
Expand All @@ -3436,10 +3434,6 @@ accumulate_reduce(accumulateobject *lz, PyObject *Py_UNUSED(ignored))
if (lz->total == Py_None) {
PyObject *it;

if (PyType_Ready(state->chain_type) < 0)
return NULL;
if (PyType_Ready(state->islice_type) < 0)
return NULL;
it = PyObject_CallFunction((PyObject *)state->chain_type, "(O)O",
lz->total, lz->it);
if (it == NULL)
Expand Down