Skip to content

Commit 55cee70

Browse files
author
Erlend E. Aasland
committed
Address review: fix performance issue in tee_copy()
1 parent 8d8cd61 commit 55cee70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/itertoolsmodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,7 @@ tee_copy(teeobject *to, PyObject *Py_UNUSED(ignored))
787787
{
788788
teeobject *newto;
789789

790-
itertoolsmodule_state *state = itertoolsmodule_find_state_by_type(Py_TYPE(to));
791-
newto = PyObject_GC_New(teeobject, state->tee_type);
790+
newto = PyObject_GC_New(teeobject, Py_TYPE(to));
792791
if (newto == NULL)
793792
return NULL;
794793
Py_INCREF(to->dataobj);

0 commit comments

Comments
 (0)