Lines Matching refs:stop
16 PyObject *stop; member
42 compute_range_length(PyObject *start, PyObject *stop, PyObject *step);
46 PyObject *stop, PyObject *step) in make_range_object() argument
50 length = compute_range_length(start, stop, step); in make_range_object()
60 obj->stop = stop; in make_range_object()
75 PyObject *start = NULL, *stop = NULL, *step = NULL; in range_new() local
81 if (!PyArg_UnpackTuple(args, "range", 1, 1, &stop)) in range_new()
83 stop = PyNumber_Index(stop); in range_new()
84 if (!stop) in range_new()
93 &start, &stop, &step)) in range_new()
100 stop = PyNumber_Index(stop); in range_new()
101 if (!stop) { in range_new()
108 Py_DECREF(stop); in range_new()
113 obj = make_range_object(type, start, stop, step); in range_new()
119 Py_DECREF(stop); in range_new()
138 Py_DECREF(r->stop); in range_dealloc()
149 compute_range_length(PyObject *start, PyObject *stop, PyObject *step) in compute_range_length() argument
167 hi = stop; in compute_range_length()
170 lo = stop; in compute_range_length()
302 PyObject *start = NULL, *stop = NULL, *step = NULL; in compute_slice() local
306 error = _PySlice_GetLongIndices(slice, r->length, &start, &stop, &step); in compute_slice()
318 substop = compute_item(r, stop); in compute_slice()
320 Py_CLEAR(stop); in compute_slice()
328 Py_XDECREF(stop); in compute_slice()
352 cmp3 = PyObject_RichCompareBool(ob, r->stop, Py_LT); in range_contains_long()
356 cmp3 = PyObject_RichCompareBool(r->stop, ob, Py_LT); in range_contains_long()
586 return PyUnicode_FromFormat("range(%R, %R)", r->start, r->stop); in range_repr()
589 r->start, r->stop, r->step); in range_repr()
597 r->start, r->stop, r->step); in range_reduce()
661 {"stop", T_OBJECT_EX, offsetof(rangeobject, stop), READONLY},
745 PyObject *start=NULL, *stop=NULL, *step=NULL; in rangeiter_reduce() local
752 stop = PyLong_FromLong(r->start + r->len * r->step); in rangeiter_reduce()
753 if (stop == NULL) in rangeiter_reduce()
759 start, stop, step); in rangeiter_reduce()
766 Py_XDECREF(stop); in rangeiter_reduce()
864 fast_range_iter(long start, long stop, long step) in fast_range_iter() argument
872 ulen = get_len_of_range(start, stop, step); in fast_range_iter()
901 PyObject *product, *stop=NULL; in longrangeiter_reduce() local
908 stop = PyNumber_Add(r->start, product); in longrangeiter_reduce()
910 if (stop == NULL) in longrangeiter_reduce()
915 r->start, stop, r->step); in longrangeiter_reduce()
918 Py_DECREF(stop); in longrangeiter_reduce()
1050 lstop = PyLong_AsLong(r->stop); in range_iter()
1109 lstop = PyLong_AsLong(range->stop); in range_reverse()