Lines Matching refs:size
141 current size, then proceed with the realloc() to shrink the array.
159 /* This over-allocates proportional to the array size, making room
174 like it does for lists since the size is not known at compile time */
213 must use the next size up that is signed ('h') and manually do
313 must use the next size up and manually do the overflow checking */
586 newarrayobject(PyTypeObject *type, Py_ssize_t size, const struct arraydescr *descr)
591 if (size < 0) {
597 if (size > PY_SSIZE_T_MAX / descr->itemsize) {
600 nbytes = size * descr->itemsize;
606 op->allocated = size;
608 Py_SET_SIZE(op, size);
609 if (size <= 0) {
878 Py_ssize_t size;
894 size = Py_SIZE(a) + Py_SIZE(b);
895 np = (arrayobject *) newarrayobject(state->ArrayType, size, a->ob_descr);
921 Py_ssize_t size = array_length * n;
922 arrayobject* np = (arrayobject *) newarrayobject(state->ArrayType, size, a->ob_descr);
925 if (size == 0)
939 Py_ssize_t d; /* Change in size */
953 assignment would change the size of the array, fail early to make
1019 Py_ssize_t size, oldsize, bbsize;
1035 /* Get the size of bb before resizing the array since bb could be self. */
1037 size = oldsize + Py_SIZE(b);
1038 if (array_resize(self, size) == -1)
1078 Py_ssize_t size = array_size * self->ob_descr->itemsize;
1079 if (n > 0 && size > PY_SSIZE_T_MAX / n) {
1085 _PyBytes_Repeat(self->ob_item, n*size, self->ob_item, size);
1367 If the items in the array are not 1, 2, 4, or 8 bytes in size, RuntimeError is
1535 /* XXX Make the block size settable */
1549 Py_ssize_t size = BLOCKSIZE;
1552 if (i*BLOCKSIZE + size > nbytes)
1553 size = nbytes - i*BLOCKSIZE;
1554 bytes = PyBytes_FromStringAndSize(ptr, size);
1602 "list changed size during iteration");
1653 "bytes length not a multiple of item size");
1791 size_t size;
2034 if (Py_SIZE(items) % mformat_descriptors[mformat_code].size != 0) {
2036 "string length not a multiple of item size");
2120 Py_ssize_t itemcount = Py_SIZE(items) / mf_descr.size;
2137 (size_t)descr->itemsize == mf_descr.size &&
2149 &memstr[i * mf_descr.size],
2150 mf_descr.size,
2285 "the size, in bytes, of one array item"},
2482 assignment would change the size of the array, fail early to make
2548 "attempt to assign array of size %zd "
2549 "to extended slice of size %zd",
2768 Type code C Type Minimum size in bytes\n\