Lines Matching refs:Py_SIZE
56 Py_SIZE(self) < newsize + 16 &&
58 Py_SIZE(self) = newsize;
74 _new_size = (newsize >> 4) + (Py_SIZE(self) < 8 ? 3 : 7) + newsize;
87 Py_SIZE(self) = newsize;
438 Py_SIZE(op) = size;
458 assert(i>=0 && i<Py_SIZE(ap));
466 Py_ssize_t n = Py_SIZE(self);
521 if (Py_SIZE(va) != Py_SIZE(wa) && (op == Py_EQ || op == Py_NE)) {
533 for (i = 0; i < Py_SIZE(va) && i < Py_SIZE(wa); i++) {
552 Py_ssize_t vs = Py_SIZE(va);
553 Py_ssize_t ws = Py_SIZE(wa);
593 return Py_SIZE(a);
599 if (i < 0 || i >= Py_SIZE(a)) {
612 else if (ilow > Py_SIZE(a))
613 ilow = Py_SIZE(a);
618 else if (ihigh > Py_SIZE(a))
619 ihigh = Py_SIZE(a);
633 return array_slice(a, 0, Py_SIZE(a));
657 if (Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b)) {
660 size = Py_SIZE(a) + Py_SIZE(b);
665 if (Py_SIZE(a) > 0) {
666 memcpy(np->ob_item, a->ob_item, Py_SIZE(a)*a->ob_descr->itemsize);
668 if (Py_SIZE(b) > 0) {
669 memcpy(np->ob_item + Py_SIZE(a)*a->ob_descr->itemsize,
670 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize);
686 if ((Py_SIZE(a) != 0) && (n > PY_SSIZE_T_MAX / Py_SIZE(a))) {
689 size = Py_SIZE(a) * n;
696 nbytes = Py_SIZE(a) * a->ob_descr->itemsize;
714 n = Py_SIZE(b);
738 else if (ilow > Py_SIZE(a))
739 ilow = Py_SIZE(a);
744 else if (ihigh > Py_SIZE(a))
745 ihigh = Py_SIZE(a);
751 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize);
752 Py_SIZE(a) += d;
753 PyMem_RESIZE(item, char, Py_SIZE(a)*a->ob_descr->itemsize);
756 a->allocated = Py_SIZE(a);
760 (Py_SIZE(a) + d)*a->ob_descr->itemsize);
767 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize);
769 Py_SIZE(a) += d;
770 a->allocated = Py_SIZE(a);
782 if (i < 0 || i >= Py_SIZE(a)) {
809 if (ins1(self, Py_SIZE(self), v) != 0) {
836 if ((Py_SIZE(self) > PY_SSIZE_T_MAX - Py_SIZE(b)) ||
837 ((Py_SIZE(self) + Py_SIZE(b)) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) {
841 size = Py_SIZE(self) + Py_SIZE(b);
849 if (Py_SIZE(b) > 0) {
850 memcpy(self->ob_item + Py_SIZE(self)*self->ob_descr->itemsize,
851 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize);
853 Py_SIZE(self) = size;
881 if (Py_SIZE(self) > 0) {
886 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) {
889 size = Py_SIZE(self) * self->ob_descr->itemsize;
893 Py_SIZE(self) = 0;
909 Py_SIZE(self) *= n;
910 self->allocated = Py_SIZE(self);
933 for (i = 0; i < Py_SIZE(self); i++) {
955 for (i = 0; i < Py_SIZE(self); i++) {
980 for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(self); i++) {
993 for (i = 0; i < Py_SIZE(self); i++) {
1023 if (Py_SIZE(self) == 0) {
1029 i += Py_SIZE(self);
1030 if (i < 0 || i >= Py_SIZE(self)) {
1093 v = PyInt_FromSsize_t(Py_SIZE(self));
1115 return ins(self, Py_SIZE(self), v);
1134 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 2) {
1141 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 4) {
1151 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 8) {
1190 if (Py_SIZE(self) > 1) {
1192 q = self->ob_item + (Py_SIZE(self) - 1)*itemsize;
1233 if ((newlength = Py_SIZE(self) + n) <= 0 ||
1244 Py_SIZE(self) += n;
1245 self->allocated = Py_SIZE(self);
1246 nread = fread(item + (Py_SIZE(self) - n) * itemsize,
1249 Py_SIZE(self) -= (n - nread);
1250 PyMem_RESIZE(item, char, Py_SIZE(self)*itemsize);
1252 self->allocated = Py_SIZE(self);
1338 PyMem_RESIZE(item, char, (Py_SIZE(self) + n) * itemsize);
1344 Py_SIZE(self) += n;
1345 self->allocated = Py_SIZE(self);
1349 Py_SIZE(self) - n + i, v) != 0) {
1350 Py_SIZE(self) -= n;
1355 Py_SIZE(self) * itemsize);
1357 self->allocated = Py_SIZE(self);
1375 PyObject *list = PyList_New(Py_SIZE(self));
1380 for (i = 0; i < Py_SIZE(self); i++) {
1418 if ((n > PY_SSIZE_T_MAX - Py_SIZE(self)) ||
1419 ((Py_SIZE(self) + n) > PY_SSIZE_T_MAX / itemsize)) {
1422 PyMem_RESIZE(item, char, (Py_SIZE(self) + n) * itemsize);
1428 Py_SIZE(self) += n;
1429 self->allocated = Py_SIZE(self);
1430 memcpy(item + (Py_SIZE(self) - n) * itemsize,
1449 Py_SIZE(self) * self->ob_descr->itemsize);
1480 if (Py_SIZE(self) > PY_SSIZE_T_MAX - n) {
1483 PyMem_RESIZE(item, Py_UNICODE, Py_SIZE(self) + n);
1489 Py_SIZE(self) += n;
1490 self->allocated = Py_SIZE(self);
1491 memcpy(item + Py_SIZE(self) - n,
1516 return PyUnicode_FromUnicode((Py_UNICODE *) self->ob_item, Py_SIZE(self));
1661 len = Py_SIZE(a);
1695 i += Py_SIZE(self);
1704 if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
1758 i += Py_SIZE(self);
1759 if (i < 0 || i >= Py_SIZE(self)) {
1776 Py_SIZE(self), &start, &stop,
1792 needed = Py_SIZE(other);
1823 (Py_SIZE(self) - stop) * itemsize);
1824 if (array_resize(self, Py_SIZE(self) +
1829 if (array_resize(self, Py_SIZE(self) +
1834 (Py_SIZE(self) - start - needed) * itemsize);
1855 if (cur + step >= (size_t)Py_SIZE(self))
1856 lim = Py_SIZE(self) - cur - 1;
1862 if (cur < (size_t)Py_SIZE(self)) {
1865 (Py_SIZE(self) - cur) * itemsize);
1867 if (array_resize(self, Py_SIZE(self) - slicelength) < 0)
1910 return Py_SIZE(self)*self->ob_descr->itemsize;
1924 return Py_SIZE(self)*self->ob_descr->itemsize;
1931 *lenp = Py_SIZE(self)*self->ob_descr->itemsize;
2054 Py_SIZE(self) = n / sizeof(Py_UNICODE);
2056 self->allocated = Py_SIZE(self);
2225 if (it->index < Py_SIZE(it->ao))