• Home
  • Raw
  • Download

Lines Matching refs:itemsize

34     int itemsize;  member
171 if (_new_size <= ((~(size_t)0) / self->ob_descr->itemsize)) in array_resize()
172 PyMem_RESIZE(items, char, (_new_size * self->ob_descr->itemsize)); in array_resize()
593 if (size > PY_SSIZE_T_MAX / descr->itemsize) { in newarrayobject()
596 nbytes = size * descr->itemsize; in newarrayobject()
656 memmove(items + (where+1)*self->ob_descr->itemsize, in ins1()
657 items + where*self->ob_descr->itemsize, in ins1()
658 (n-where)*self->ob_descr->itemsize); in ins1()
834 memcpy(np->ob_item, a->ob_item + ilow * a->ob_descr->itemsize, in array_slice()
835 (ihigh-ilow) * a->ob_descr->itemsize); in array_slice()
896 memcpy(np->ob_item, a->ob_item, Py_SIZE(a)*a->ob_descr->itemsize); in array_concat()
899 memcpy(np->ob_item + Py_SIZE(a)*a->ob_descr->itemsize, in array_concat()
900 b->ob_item, Py_SIZE(b)*b->ob_descr->itemsize); in array_concat()
924 oldbytes = Py_SIZE(a) * a->ob_descr->itemsize; in array_repeat()
967 memmove(item + (ihigh-d)*a->ob_descr->itemsize, in array_del_slice()
968 item + ihigh*a->ob_descr->itemsize, in array_del_slice()
969 (Py_SIZE(a)-ihigh)*a->ob_descr->itemsize); in array_del_slice()
1036 ((Py_SIZE(self) + Py_SIZE(b)) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_do_extend()
1047 memcpy(self->ob_item + oldsize * self->ob_descr->itemsize, in array_do_extend()
1048 b->ob_item, bbsize * b->ob_descr->itemsize); in array_do_extend()
1081 if ((self->ob_descr->itemsize != 0) && in array_inplace_repeat()
1082 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { in array_inplace_repeat()
1085 size = Py_SIZE(self) * self->ob_descr->itemsize; in array_inplace_repeat()
1388 switch (self->ob_descr->itemsize) { in array_array_byteswap_impl()
1442 Py_ssize_t itemsize = self->ob_descr->itemsize; in array_array_reverse_impl() local
1446 assert((size_t)itemsize <= sizeof(tmp)); in array_array_reverse_impl()
1450 q = self->ob_item + (Py_SIZE(self) - 1)*itemsize; in array_array_reverse_impl()
1452 p += itemsize, q -= itemsize) { in array_array_reverse_impl()
1456 memcpy(tmp, p, itemsize); in array_array_reverse_impl()
1457 memcpy(p, q, itemsize); in array_array_reverse_impl()
1458 memcpy(q, tmp, itemsize); in array_array_reverse_impl()
1480 Py_ssize_t itemsize = self->ob_descr->itemsize; in array_array_fromfile_impl() local
1489 if (n > PY_SSIZE_T_MAX / itemsize) { in array_array_fromfile_impl()
1493 nbytes = n * itemsize; in array_array_fromfile_impl()
1536 Py_ssize_t nbytes = Py_SIZE(self) * self->ob_descr->itemsize; in array_array_tofile()
1642 int itemsize = self->ob_descr->itemsize; in frombytes() local
1644 if (buffer->itemsize != 1) { in frombytes()
1650 if (n % itemsize != 0) { in frombytes()
1656 n = n / itemsize; in frombytes()
1660 ((old_size + n) > PY_SSIZE_T_MAX / itemsize)) { in frombytes()
1668 memcpy(self->ob_item + old_size * itemsize, in frombytes()
1669 buffer->buf, n * itemsize); in frombytes()
1701 if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) { in array_array_tobytes_impl()
1703 Py_SIZE(self) * self->ob_descr->itemsize); in array_array_tobytes_impl()
1783 res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * self->ob_descr->itemsize; in array_array___sizeof___impl()
2139 (size_t)descr->itemsize == mf_descr.size && in array__array_reconstructor_impl()
2277 return PyLong_FromLong((long)a->ob_descr->itemsize); in array_get_itemsize()
2360 int itemsize = self->ob_descr->itemsize; in array_subscr() local
2377 self->ob_item + start * itemsize, in array_subscr()
2378 slicelength * itemsize); in array_subscr()
2389 memcpy(ar->ob_item + i*itemsize, in array_subscr()
2390 self->ob_item + cur*itemsize, in array_subscr()
2391 itemsize); in array_subscr()
2410 int itemsize; in array_ass_subscr() local
2474 itemsize = self->ob_descr->itemsize; in array_ass_subscr()
2491 memmove(self->ob_item + (start + needed) * itemsize, in array_ass_subscr()
2492 self->ob_item + stop * itemsize, in array_ass_subscr()
2493 (Py_SIZE(self) - stop) * itemsize); in array_ass_subscr()
2502 memmove(self->ob_item + (start + needed) * itemsize, in array_ass_subscr()
2503 self->ob_item + stop * itemsize, in array_ass_subscr()
2504 (Py_SIZE(self) - start - needed) * itemsize); in array_ass_subscr()
2507 memcpy(self->ob_item + start * itemsize, in array_ass_subscr()
2508 other->ob_item, needed * itemsize); in array_ass_subscr()
2527 memmove(self->ob_item + (cur - i) * itemsize, in array_ass_subscr()
2528 self->ob_item + (cur + 1) * itemsize, in array_ass_subscr()
2529 lim * itemsize); in array_ass_subscr()
2533 memmove(self->ob_item + (cur-slicelength) * itemsize, in array_ass_subscr()
2534 self->ob_item + cur * itemsize, in array_ass_subscr()
2535 (Py_SIZE(self) - cur) * itemsize); in array_ass_subscr()
2554 memcpy(self->ob_item + cur * itemsize, in array_ass_subscr()
2555 other->ob_item + i * itemsize, in array_ass_subscr()
2556 itemsize); in array_ass_subscr()
2579 view->len = Py_SIZE(self) * self->ob_descr->itemsize; in array_buffer_getbuf()
2582 view->itemsize = self->ob_descr->itemsize; in array_buffer_getbuf()
2590 view->strides = &(view->itemsize); in array_buffer_getbuf()
2728 memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize); in array_new()