Skip to content

Commit c4981ff

Browse files
Ditto again
1 parent cf3d528 commit c4981ff

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Modules/itertoolsmodule.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,12 +2013,11 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
20132013
{
20142014
PyObject *source;
20152015

2016-
itertools_state *st = find_state_by_type(type);
2017-
if ((type == st->chain_type || type->tp_init == st->chain_type->tp_init)
2018-
&& !_PyArg_NoKeywords("chain", kwds))
2019-
{
2016+
itertools_state *state = find_state_by_type(type);
2017+
PyTypeObject *chain_type = state->chain_type;
2018+
if ((type == chain_type || type->tp_init == chain_type->tp_init) &&
2019+
!_PyArg_NoKeywords("chain", kwds))
20202020
return NULL;
2021-
}
20222021

20232022
source = PyObject_GetIter(args);
20242023
if (source == NULL)

0 commit comments

Comments
 (0)