• Home
  • Raw
  • Download

Lines Matching refs:Py_SIZE

117     if (self->ob_exports > 0 && newsize != Py_SIZE(self)) {  in array_resize()
129 Py_SIZE(self) < newsize + 16 && in array_resize()
155 _new_size = (newsize >> 4) + (Py_SIZE(self) < 8 ? 3 : 7) + newsize; in array_resize()
624 assert(i>=0 && i<Py_SIZE(ap)); in getarrayitem()
632 Py_ssize_t n = Py_SIZE(self); in ins1()
685 if (Py_SIZE(va) != Py_SIZE(wa) && (op == Py_EQ || op == Py_NE)) { in array_richcompare()
698 Py_ssize_t common_length = Py_MIN(Py_SIZE(va), Py_SIZE(wa)); in array_richcompare()
722 for (i = 0; i < Py_SIZE(va) && i < Py_SIZE(wa); i++) { in array_richcompare()
742 Py_ssize_t vs = Py_SIZE(va); in array_richcompare()
743 Py_ssize_t ws = Py_SIZE(wa); in array_richcompare()
785 return Py_SIZE(a); in array_length()
791 if (i < 0 || i >= Py_SIZE(a)) { in array_item()
804 else if (ilow > Py_SIZE(a)) in array_slice()
805 ilow = Py_SIZE(a); in array_slice()
810 else if (ihigh > Py_SIZE(a)) in array_slice()
811 ihigh = Py_SIZE(a); in array_slice()
833 return array_slice(self, 0, Py_SIZE(self)); in array_array___copy___impl()
868 if (Py_SIZE(a) > PY_SSIZE_T_MAX - Py_SIZE(b)) { in array_concat()
871 size = Py_SIZE(a) + Py_SIZE(b); in array_concat()
876 if (Py_SIZE(a) > 0) { in array_concat()
877 memcpy(np->ob_item, a->ob_item, Py_SIZE(a)*a->ob_descr->itemsize); in array_concat()
879 if (Py_SIZE(b) > 0) { in array_concat()
880 memcpy(np->ob_item + Py_SIZE(a)*a->ob_descr->itemsize, in array_concat()
881 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize); in array_concat()
895 if ((Py_SIZE(a) != 0) && (n > PY_SSIZE_T_MAX / Py_SIZE(a))) { in array_repeat()
898 size = Py_SIZE(a) * n; in array_repeat()
904 oldbytes = Py_SIZE(a) * a->ob_descr->itemsize; in array_repeat()
928 else if (ilow > Py_SIZE(a)) in array_del_slice()
929 ilow = Py_SIZE(a); in array_del_slice()
934 else if (ihigh > Py_SIZE(a)) in array_del_slice()
935 ihigh = Py_SIZE(a); in array_del_slice()
949 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize); in array_del_slice()
950 if (array_resize(a, Py_SIZE(a) - d) == -1) in array_del_slice()
959 if (i < 0 || i >= Py_SIZE(a)) { in array_ass_item()
986 if (ins1(self, Py_SIZE(self), v) != 0) { in array_iter_extend()
1012 if ((Py_SIZE(self) > PY_SSIZE_T_MAX - Py_SIZE(b)) || in array_do_extend()
1013 ((Py_SIZE(self) + Py_SIZE(b)) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_do_extend()
1017 oldsize = Py_SIZE(self); in array_do_extend()
1019 bbsize = Py_SIZE(bb); in array_do_extend()
1020 size = oldsize + Py_SIZE(b); in array_do_extend()
1053 if (Py_SIZE(self) > 0) { in array_inplace_repeat()
1057 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_inplace_repeat()
1060 size = Py_SIZE(self) * self->ob_descr->itemsize; in array_inplace_repeat()
1064 if (array_resize(self, n * Py_SIZE(self)) == -1) in array_inplace_repeat()
1101 for (i = 0; i < Py_SIZE(self); i++) { in array_array_count()
1134 for (i = 0; i < Py_SIZE(self); i++) { in array_array_index()
1159 for (i = 0, cmp = 0 ; cmp == 0 && i < Py_SIZE(self); i++) { in array_contains()
1184 for (i = 0; i < Py_SIZE(self); i++) { in array_array_remove()
1222 if (Py_SIZE(self) == 0) { in array_array_pop_impl()
1228 i += Py_SIZE(self); in array_array_pop_impl()
1229 if (i < 0 || i >= Py_SIZE(self)) { in array_array_pop_impl()
1304 v = PyLong_FromSsize_t(Py_SIZE(self)); in array_array_buffer_info_impl()
1327 return ins(self, Py_SIZE(self), v); in array_array_append()
1350 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 2) { in array_array_byteswap_impl()
1357 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 4) { in array_array_byteswap_impl()
1367 for (p = self->ob_item, i = Py_SIZE(self); --i >= 0; p += 8) { in array_array_byteswap_impl()
1406 if (Py_SIZE(self) > 1) { in array_array_reverse_impl()
1408 q = self->ob_item + (Py_SIZE(self) - 1)*itemsize; in array_array_reverse_impl()
1494 Py_ssize_t nbytes = Py_SIZE(self) * self->ob_descr->itemsize; in array_array_tofile()
1501 if (Py_SIZE(self) == 0) in array_array_tofile()
1548 old_size = Py_SIZE(self); in array_array_fromlist()
1554 Py_SIZE(self) - n + i, v) != 0) { in array_array_fromlist()
1579 PyObject *list = PyList_New(Py_SIZE(self)); in array_array_tolist_impl()
1584 for (i = 0; i < Py_SIZE(self); i++) { in array_array_tolist_impl()
1616 Py_ssize_t old_size = Py_SIZE(self); in frombytes()
1659 if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) { in array_array_tobytes_impl()
1661 Py_SIZE(self) * self->ob_descr->itemsize); in array_array_tobytes_impl()
1695 Py_ssize_t old_size = Py_SIZE(self); in array_array_fromunicode_impl()
1727 return PyUnicode_FromWideChar((wchar_t *) self->ob_item, Py_SIZE(self)); in array_array_tounicode_impl()
1991 if (Py_SIZE(items) % mformat_descriptors[mformat_code].size != 0) { in array__array_reconstructor_impl()
2001 Py_ssize_t itemcount = Py_SIZE(items) / 4; in array__array_reconstructor_impl()
2023 Py_ssize_t itemcount = Py_SIZE(items) / 8; in array__array_reconstructor_impl()
2045 PyBytes_AS_STRING(items), Py_SIZE(items), in array__array_reconstructor_impl()
2055 PyBytes_AS_STRING(items), Py_SIZE(items), in array__array_reconstructor_impl()
2079 Py_ssize_t itemcount = Py_SIZE(items) / mf_descr.size; in array__array_reconstructor_impl()
2278 len = Py_SIZE(a); in array_repr()
2307 i += Py_SIZE(self); in array_subscr()
2320 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_subscr()
2372 i += Py_SIZE(self); in array_ass_subscr()
2373 if (i < 0 || i >= Py_SIZE(self)) { in array_ass_subscr()
2392 slicelength = PySlice_AdjustIndices(Py_SIZE(self), &start, &stop, in array_ass_subscr()
2406 needed = Py_SIZE(other); in array_ass_subscr()
2447 (Py_SIZE(self) - stop) * itemsize); in array_ass_subscr()
2448 if (array_resize(self, Py_SIZE(self) + in array_ass_subscr()
2453 if (array_resize(self, Py_SIZE(self) + in array_ass_subscr()
2458 (Py_SIZE(self) - start - needed) * itemsize); in array_ass_subscr()
2479 if (cur + step >= (size_t)Py_SIZE(self)) in array_ass_subscr()
2480 lim = Py_SIZE(self) - cur - 1; in array_ass_subscr()
2486 if (cur < (size_t)Py_SIZE(self)) { in array_ass_subscr()
2489 (Py_SIZE(self) - cur) * itemsize); in array_ass_subscr()
2491 if (array_resize(self, Py_SIZE(self) - slicelength) < 0) in array_ass_subscr()
2539 view->len = (Py_SIZE(self)) * self->ob_descr->itemsize; in array_buffer_getbuf()
2546 view->shape = &((Py_SIZE(self))); in array_buffer_getbuf()
2649 len = Py_SIZE(initial); in array_new()
2875 if (it->index < Py_SIZE(ao)) { in arrayiter_next()
2934 else if (index > Py_SIZE(self->ao)) in array_arrayiterator___setstate__()
2935 index = Py_SIZE(self->ao); /* iterator exhausted */ in array_arrayiterator___setstate__()