Lines Matching refs:slicelen
1740 Py_ssize_t start, stop, step, slicelen, i; in element_subscr() local
1750 slicelen = PySlice_AdjustIndices(self->extra->length, &start, &stop, in element_subscr()
1753 if (slicelen <= 0) in element_subscr()
1756 list = PyList_New(slicelen); in element_subscr()
1760 for (cur = start, i = 0; i < slicelen; in element_subscr()
1793 Py_ssize_t start, stop, step, slicelen, newlen, i; in element_ass_subscr() local
1807 slicelen = PySlice_AdjustIndices(self->extra->length, &start, &stop, in element_ass_subscr()
1815 if (slicelen <= 0) in element_ass_subscr()
1823 start = stop + step * (slicelen - 1) - 1; in element_ass_subscr()
1827 assert((size_t)slicelen <= SIZE_MAX / sizeof(PyObject *)); in element_ass_subscr()
1832 if (!(recycle = PyList_New(slicelen))) { in element_ass_subscr()
1861 cur = start + (size_t)slicelen * step; in element_ass_subscr()
1864 self->extra->children + cur - slicelen, in element_ass_subscr()
1869 self->extra->length -= slicelen; in element_ass_subscr()
1887 if (step != 1 && newlen != slicelen) in element_ass_subscr()
1893 newlen, slicelen in element_ass_subscr()
1899 if (newlen > slicelen) { in element_ass_subscr()
1900 if (element_resize(self, newlen - slicelen) < 0) { in element_ass_subscr()
1915 if (slicelen > 0) { in element_ass_subscr()
1919 recycle = PyList_New(slicelen); in element_ass_subscr()
1924 for (cur = start, i = 0; i < slicelen; in element_ass_subscr()
1929 if (newlen < slicelen) { in element_ass_subscr()
1932 self->extra->children[i + newlen - slicelen] = self->extra->children[i]; in element_ass_subscr()
1933 } else if (newlen > slicelen) { in element_ass_subscr()
1936 self->extra->children[i + newlen - slicelen] = self->extra->children[i]; in element_ass_subscr()
1947 self->extra->length += newlen - slicelen; in element_ass_subscr()