Lines Matching refs:ro
234 reversedobject *ro; in reversed_new() local
273 ro = (reversedobject *)type->tp_alloc(type, 0); in reversed_new()
274 if (ro == NULL) in reversed_new()
277 ro->index = n-1; in reversed_new()
279 ro->seq = seq; in reversed_new()
280 return (PyObject *)ro; in reversed_new()
284 reversed_dealloc(reversedobject *ro) in reversed_dealloc() argument
286 PyObject_GC_UnTrack(ro); in reversed_dealloc()
287 Py_XDECREF(ro->seq); in reversed_dealloc()
288 Py_TYPE(ro)->tp_free(ro); in reversed_dealloc()
292 reversed_traverse(reversedobject *ro, visitproc visit, void *arg) in reversed_traverse() argument
294 Py_VISIT(ro->seq); in reversed_traverse()
299 reversed_next(reversedobject *ro) in reversed_next() argument
302 Py_ssize_t index = ro->index; in reversed_next()
305 item = PySequence_GetItem(ro->seq, index); in reversed_next()
307 ro->index--; in reversed_next()
314 ro->index = -1; in reversed_next()
315 Py_CLEAR(ro->seq); in reversed_next()
325 reversed_len(reversedobject *ro) in reversed_len() argument
329 if (ro->seq == NULL) in reversed_len()
331 seqsize = PySequence_Size(ro->seq); in reversed_len()
334 position = ro->index + 1; in reversed_len()