summaryrefslogtreecommitdiffstats
path: root/Objects/iterobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/iterobject.c')
-rw-r--r--Objects/iterobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index da89298..fe1de7e 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -11,6 +11,8 @@ typedef struct {
PyObject *it_seq; /* Set to NULL when iterator is exhausted */
} seqiterobject;
+_Py_IDENTIFIER(iter);
+
PyObject *
PySeqIter_New(PyObject *seq)
{
@@ -104,7 +106,6 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(
static PyObject *
iter_reduce(seqiterobject *it, PyObject *Py_UNUSED(ignored))
{
- _Py_IDENTIFIER(iter);
if (it->it_seq != NULL)
return Py_BuildValue("N(O)n", _PyEval_GetBuiltinId(&PyId_iter),
it->it_seq, it->it_index);
@@ -244,7 +245,6 @@ calliter_iternext(calliterobject *it)
static PyObject *
calliter_reduce(calliterobject *it, PyObject *Py_UNUSED(ignored))
{
- _Py_IDENTIFIER(iter);
if (it->it_callable != NULL && it->it_sentinel != NULL)
return Py_BuildValue("N(OO)", _PyEval_GetBuiltinId(&PyId_iter),
it->it_callable, it->it_sentinel);