Lines Matching defs:size
29 this function must not be called with size == 0 (unless from PyTuple_New()
33 tuple_alloc(Py_ssize_t size)
35 if (size < 0) {
40 assert(size != 0); // The empty tuple is statically allocated.
43 PyTupleObject *op = maybe_freelist_pop(size);
46 if ((size_t)size > ((size_t)PY_SSIZE_T_MAX - (sizeof(PyTupleObject) -
50 op = PyObject_GC_NewVar(PyTupleObject, &PyTuple_Type, size);
69 PyTuple_New(Py_ssize_t size)
72 if (size == 0) {
75 op = tuple_alloc(size);
79 for (Py_ssize_t i = 0; i < size; i++) {
447 Py_ssize_t size;
468 size = Py_SIZE(a) + Py_SIZE(b);
469 if (size == 0) {
473 np = tuple_alloc(size);
498 Py_ssize_t size;
513 size = Py_SIZE(a) * n;
514 np = tuple_alloc(size);
518 PyObject **dest_end = dest + size;
908 it changes the size of a tuple. We get away with this only if there
1174 maybe_freelist_pop(Py_ssize_t size)
1182 if (size == 0) {
1185 assert(size > 0);
1186 if (size < PyTuple_MAXSAVESIZE) {
1187 Py_ssize_t index = size - 1;
1198 Py_SET_SIZE(op, size);