• Home
  • Raw
  • Download

Lines Matching refs:it

16     seqiterobject *it;  in PySeqIter_New()  local
22 it = PyObject_GC_New(seqiterobject, &PySeqIter_Type); in PySeqIter_New()
23 if (it == NULL) in PySeqIter_New()
25 it->it_index = 0; in PySeqIter_New()
27 it->it_seq = seq; in PySeqIter_New()
28 _PyObject_GC_TRACK(it); in PySeqIter_New()
29 return (PyObject *)it; in PySeqIter_New()
33 iter_dealloc(seqiterobject *it) in iter_dealloc() argument
35 _PyObject_GC_UNTRACK(it); in iter_dealloc()
36 Py_XDECREF(it->it_seq); in iter_dealloc()
37 PyObject_GC_Del(it); in iter_dealloc()
41 iter_traverse(seqiterobject *it, visitproc visit, void *arg) in iter_traverse() argument
43 Py_VISIT(it->it_seq); in iter_traverse()
50 seqiterobject *it; in iter_iternext() local
55 it = (seqiterobject *)iterator; in iter_iternext()
56 seq = it->it_seq; in iter_iternext()
59 if (it->it_index == PY_SSIZE_T_MAX) { in iter_iternext()
65 result = PySequence_GetItem(seq, it->it_index); in iter_iternext()
67 it->it_index++; in iter_iternext()
74 it->it_seq = NULL; in iter_iternext()
81 iter_len(seqiterobject *it) in iter_len() argument
85 if (it->it_seq) { in iter_len()
86 if (_PyObject_HasLen(it->it_seq)) { in iter_len()
87 seqsize = PySequence_Size(it->it_seq); in iter_len()
94 len = seqsize - it->it_index; in iter_len()
104 iter_reduce(seqiterobject *it) in iter_reduce() argument
106 if (it->it_seq != NULL) in iter_reduce()
108 it->it_seq, it->it_index); in iter_reduce()
116 iter_setstate(seqiterobject *it, PyObject *state) in iter_setstate() argument
121 if (it->it_seq != NULL) { in iter_setstate()
124 it->it_index = index; in iter_setstate()
182 calliterobject *it; in PyCallIter_New() local
183 it = PyObject_GC_New(calliterobject, &PyCallIter_Type); in PyCallIter_New()
184 if (it == NULL) in PyCallIter_New()
187 it->it_callable = callable; in PyCallIter_New()
189 it->it_sentinel = sentinel; in PyCallIter_New()
190 _PyObject_GC_TRACK(it); in PyCallIter_New()
191 return (PyObject *)it; in PyCallIter_New()
194 calliter_dealloc(calliterobject *it) in calliter_dealloc() argument
196 _PyObject_GC_UNTRACK(it); in calliter_dealloc()
197 Py_XDECREF(it->it_callable); in calliter_dealloc()
198 Py_XDECREF(it->it_sentinel); in calliter_dealloc()
199 PyObject_GC_Del(it); in calliter_dealloc()
203 calliter_traverse(calliterobject *it, visitproc visit, void *arg) in calliter_traverse() argument
205 Py_VISIT(it->it_callable); in calliter_traverse()
206 Py_VISIT(it->it_sentinel); in calliter_traverse()
211 calliter_iternext(calliterobject *it) in calliter_iternext() argument
215 if (it->it_callable == NULL) { in calliter_iternext()
219 result = _PyObject_CallNoArg(it->it_callable); in calliter_iternext()
223 ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ); in calliter_iternext()
230 Py_CLEAR(it->it_callable); in calliter_iternext()
231 Py_CLEAR(it->it_sentinel); in calliter_iternext()
236 Py_CLEAR(it->it_callable); in calliter_iternext()
237 Py_CLEAR(it->it_sentinel); in calliter_iternext()
243 calliter_reduce(calliterobject *it) in calliter_reduce() argument
245 if (it->it_callable != NULL && it->it_sentinel != NULL) in calliter_reduce()
247 it->it_callable, it->it_sentinel); in calliter_reduce()