Lines Matching refs:itemsize
31 int itemsize; member
159 if (_new_size <= ((~(size_t)0) / self->ob_descr->itemsize)) in array_resize()
160 PyMem_RESIZE(items, char, (_new_size * self->ob_descr->itemsize)); in array_resize()
587 if (size > PY_SSIZE_T_MAX / descr->itemsize) { in newarrayobject()
590 nbytes = size * descr->itemsize; in newarrayobject()
647 memmove(items + (where+1)*self->ob_descr->itemsize, in ins1()
648 items + where*self->ob_descr->itemsize, in ins1()
649 (n-where)*self->ob_descr->itemsize); in ins1()
811 memcpy(np->ob_item, a->ob_item + ilow * a->ob_descr->itemsize, in array_slice()
812 (ihigh-ilow) * a->ob_descr->itemsize); in array_slice()
872 memcpy(np->ob_item, a->ob_item, Py_SIZE(a)*a->ob_descr->itemsize); in array_concat()
875 memcpy(np->ob_item + Py_SIZE(a)*a->ob_descr->itemsize, in array_concat()
876 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize); in array_concat()
899 oldbytes = Py_SIZE(a) * a->ob_descr->itemsize; in array_repeat()
942 memmove(item + (ihigh-d)*a->ob_descr->itemsize, in array_del_slice()
943 item + ihigh*a->ob_descr->itemsize, in array_del_slice()
944 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize); in array_del_slice()
1008 ((Py_SIZE(self) + Py_SIZE(b)) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_do_extend()
1019 memcpy(self->ob_item + oldsize * self->ob_descr->itemsize, in array_do_extend()
1020 b->ob_item, bbsize * b->ob_descr->itemsize); in array_do_extend()
1051 if ((self->ob_descr->itemsize != 0) && in array_inplace_repeat()
1052 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_inplace_repeat()
1055 size = Py_SIZE(self) * self->ob_descr->itemsize; in array_inplace_repeat()
1341 switch (self->ob_descr->itemsize) { in array_array_byteswap_impl()
1395 Py_ssize_t itemsize = self->ob_descr->itemsize; in array_array_reverse_impl() local
1399 assert((size_t)itemsize <= sizeof(tmp)); in array_array_reverse_impl()
1403 q = self->ob_item + (Py_SIZE(self) - 1)*itemsize; in array_array_reverse_impl()
1405 p += itemsize, q -= itemsize) { in array_array_reverse_impl()
1409 memcpy(tmp, p, itemsize); in array_array_reverse_impl()
1410 memcpy(p, q, itemsize); in array_array_reverse_impl()
1411 memcpy(q, tmp, itemsize); in array_array_reverse_impl()
1433 Py_ssize_t itemsize = self->ob_descr->itemsize; in array_array_fromfile_impl() local
1442 if (n > PY_SSIZE_T_MAX / itemsize) { in array_array_fromfile_impl()
1446 nbytes = n * itemsize; in array_array_fromfile_impl()
1489 Py_ssize_t nbytes = Py_SIZE(self) * self->ob_descr->itemsize; in array_array_tofile()
1595 int itemsize = self->ob_descr->itemsize; in frombytes() local
1597 if (buffer->itemsize != 1) { in frombytes()
1603 if (n % itemsize != 0) { in frombytes()
1609 n = n / itemsize; in frombytes()
1613 ((old_size + n) > PY_SSIZE_T_MAX / itemsize)) { in frombytes()
1621 memcpy(self->ob_item + old_size * itemsize, in frombytes()
1622 buffer->buf, n * itemsize); in frombytes()
1675 if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) { in array_array_tobytes_impl()
1677 Py_SIZE(self) * self->ob_descr->itemsize); in array_array_tobytes_impl()
1774 res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * self->ob_descr->itemsize; in array_array___sizeof___impl()
2129 (size_t)descr->itemsize == mf_descr.size && in array__array_reconstructor_impl()
2267 return PyLong_FromLong((long)a->ob_descr->itemsize); in array_get_itemsize()
2349 int itemsize = self->ob_descr->itemsize; in array_subscr() local
2366 self->ob_item + start * itemsize, in array_subscr()
2367 slicelength * itemsize); in array_subscr()
2378 memcpy(ar->ob_item + i*itemsize, in array_subscr()
2379 self->ob_item + cur*itemsize, in array_subscr()
2380 itemsize); in array_subscr()
2398 int itemsize; in array_ass_subscr() local
2462 itemsize = self->ob_descr->itemsize; in array_ass_subscr()
2479 memmove(self->ob_item + (start + needed) * itemsize, in array_ass_subscr()
2480 self->ob_item + stop * itemsize, in array_ass_subscr()
2481 (Py_SIZE(self) - stop) * itemsize); in array_ass_subscr()
2490 memmove(self->ob_item + (start + needed) * itemsize, in array_ass_subscr()
2491 self->ob_item + stop * itemsize, in array_ass_subscr()
2492 (Py_SIZE(self) - start - needed) * itemsize); in array_ass_subscr()
2495 memcpy(self->ob_item + start * itemsize, in array_ass_subscr()
2496 other->ob_item, needed * itemsize); in array_ass_subscr()
2515 memmove(self->ob_item + (cur - i) * itemsize, in array_ass_subscr()
2516 self->ob_item + (cur + 1) * itemsize, in array_ass_subscr()
2517 lim * itemsize); in array_ass_subscr()
2521 memmove(self->ob_item + (cur-slicelength) * itemsize, in array_ass_subscr()
2522 self->ob_item + cur * itemsize, in array_ass_subscr()
2523 (Py_SIZE(self) - cur) * itemsize); in array_ass_subscr()
2541 memcpy(self->ob_item + cur * itemsize, in array_ass_subscr()
2542 other->ob_item + i * itemsize, in array_ass_subscr()
2543 itemsize); in array_ass_subscr()
2572 view->len = (Py_SIZE(self)) * self->ob_descr->itemsize; in array_buffer_getbuf()
2575 view->itemsize = self->ob_descr->itemsize; in array_buffer_getbuf()
2583 view->strides = &(view->itemsize); in array_buffer_getbuf()
2743 memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize); in array_new()