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
Address review: fix performance issue in tee_copy()
  • Loading branch information
Erlend E. Aasland committed Jan 3, 2021
commit 55cee70766f48b6dd54932000e652dddd8c8c732
3 changes: 1 addition & 2 deletions Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,7 @@ tee_copy(teeobject *to, PyObject *Py_UNUSED(ignored))
{
teeobject *newto;

itertoolsmodule_state *state = itertoolsmodule_find_state_by_type(Py_TYPE(to));
newto = PyObject_GC_New(teeobject, state->tee_type);
newto = PyObject_GC_New(teeobject, Py_TYPE(to));
if (newto == NULL)
return NULL;
Py_INCREF(to->dataobj);
Expand Down