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);
631 return array_slice(a, 0, Py_SIZE(a));
655 if (Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b)) {
658 size = Py_SIZE(a) + Py_SIZE(b);
663 memcpy(np->ob_item, a->ob_item, Py_SIZE(a)*a->ob_descr->itemsize);
664 memcpy(np->ob_item + Py_SIZE(a)*a->ob_descr->itemsize,
665 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize);
680 if ((Py_SIZE(a) != 0) && (n > PY_SSIZE_T_MAX / Py_SIZE(a))) {
683 size = Py_SIZE(a) * n;
688 nbytes = Py_SIZE(a) * a->ob_descr->itemsize;
706 n = Py_SIZE(b);
730 else if (ilow > Py_SIZE(a))
731 ilow = Py_SIZE(a);
736 else if (ihigh > Py_SIZE(a))
737 ihigh = Py_SIZE(a);
743 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize);
744 Py_SIZE(a) += d;
745 PyMem_RESIZE(item, char, Py_SIZE(a)*a->ob_descr->itemsize);
748 a->allocated = Py_SIZE(a);
752 (Py_SIZE(a) + d)*a->ob_descr->itemsize);
759 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize);
761 Py_SIZE(a) += d;
762 a->allocated = Py_SIZE(a);
774 if (i < 0 || i >= Py_SIZE(a)) {
801 if (ins1(self, Py_SIZE(self), v) != 0) {
828 if ((Py_SIZE(self) > PY_SSIZE_T_MAX - Py_SIZE(b)) ||
829 ((Py_SIZE(self) + Py_SIZE(b)) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) {
833 size = Py_SIZE(self) + Py_SIZE(b);
841 memcpy(self->ob_item + Py_SIZE(self)*self->ob_descr->itemsize,
842 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize);
843 Py_SIZE(self) = size;
871 if (Py_SIZE(self) > 0) {
876 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) {
879 size = Py_SIZE(self) * self->ob_descr->itemsize;
883 Py_SIZE(self) = 0;
899 Py_SIZE(self) *= n;
900 self->allocated = Py_SIZE(self);
923 for (i = 0; i < Py_SIZE(self); i++) {
945 for (i = 0; i < Py_SIZE(self); i++) {
970 for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(self); i++) {
983 for (i = 0; i < Py_SIZE(self); i++) {
1013 if (Py_SIZE(self) == 0) {
1019 i += Py_SIZE(self);
1020 if (i < 0 || i >= Py_SIZE(self)) {
1076 PyTuple_SET_ITEM(retval, 1, PyInt_FromLong((long)(Py_SIZE(self))));
1093 return ins(self, Py_SIZE(self), v);
1112 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 2) {
1119 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 4) {
1129 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 8) {
1168 if (Py_SIZE(self) > 1) {
1170 q = self->ob_item + (Py_SIZE(self) - 1)*itemsize;
1211 if ((newlength = Py_SIZE(self) + n) <= 0 ||
1222 Py_SIZE(self) += n;
1223 self->allocated = Py_SIZE(self);
1224 nread = fread(item + (Py_SIZE(self) - n) * itemsize,
1227 Py_SIZE(self) -= (n - nread);
1228 PyMem_RESIZE(item, char, Py_SIZE(self)*itemsize);
1230 self->allocated = Py_SIZE(self);
1316 PyMem_RESIZE(item, char, (Py_SIZE(self) + n) * itemsize);
1322 Py_SIZE(self) += n;
1323 self->allocated = Py_SIZE(self);
1327 Py_SIZE(self) - n + i, v) != 0) {
1328 Py_SIZE(self) -= n;
1333 Py_SIZE(self) * itemsize);
1335 self->allocated = Py_SIZE(self);
1353 PyObject *list = PyList_New(Py_SIZE(self));
1358 for (i = 0; i < Py_SIZE(self); i++) {
1391 if ((n > PY_SSIZE_T_MAX - Py_SIZE(self)) ||
1392 ((Py_SIZE(self) + n) > PY_SSIZE_T_MAX / itemsize)) {
1395 PyMem_RESIZE(item, char, (Py_SIZE(self) + n) * itemsize);
1401 Py_SIZE(self) += n;
1402 self->allocated = Py_SIZE(self);
1403 memcpy(item + (Py_SIZE(self) - n) * itemsize,
1422 Py_SIZE(self) * self->ob_descr->itemsize);
1453 if (Py_SIZE(self) > PY_SSIZE_T_MAX - n) {
1456 PyMem_RESIZE(item, Py_UNICODE, Py_SIZE(self) + n);
1462 Py_SIZE(self) += n;
1463 self->allocated = Py_SIZE(self);
1464 memcpy(item + Py_SIZE(self) - n,
1489 return PyUnicode_FromUnicode((Py_UNICODE *) self->ob_item, Py_SIZE(self));
1619 len = Py_SIZE(a);
1653 i += Py_SIZE(self);
1662 if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
1716 i += Py_SIZE(self);
1717 if (i < 0 || i >= Py_SIZE(self)) {
1734 Py_SIZE(self), &start, &stop,
1750 needed = Py_SIZE(other);
1781 (Py_SIZE(self) - stop) * itemsize);
1782 if (array_resize(self, Py_SIZE(self) +
1787 if (array_resize(self, Py_SIZE(self) +
1792 (Py_SIZE(self) - start - needed) * itemsize);
1813 if (cur + step >= (size_t)Py_SIZE(self))
1814 lim = Py_SIZE(self) - cur - 1;
1820 if (cur < (size_t)Py_SIZE(self)) {
1823 (Py_SIZE(self) - cur) * itemsize);
1825 if (array_resize(self, Py_SIZE(self) - slicelength) < 0)
1868 return Py_SIZE(self)*self->ob_descr->itemsize;
1882 return Py_SIZE(self)*self->ob_descr->itemsize;
1889 *lenp = Py_SIZE(self)*self->ob_descr->itemsize;
1998 Py_SIZE(self) = n / sizeof(Py_UNICODE);
2000 self->allocated = Py_SIZE(self);
2169 if (it->index < Py_SIZE(it->ao))