Address review: fix performance issue in tee_copy()
This commit is contained in:
parent
8d8cd61df0
commit
55cee70766
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue