/third_party/python/Objects/ |
H A D | tupleobject.c | 94 return Py_SIZE(op); in PyTuple_Size() 104 if (i < 0 || i >= Py_SIZE(op)) { in PyTuple_GetItem() 120 if (i < 0 || i >= Py_SIZE(op)) { in PyTuple_SetItem() 140 n = Py_SIZE(t); in _PyTuple_MaybeUntrack() 188 if (Py_SIZE(op) == 0) { in tupledealloc() 206 Py_ssize_t i = Py_SIZE(op); in tupledealloc() 224 n = Py_SIZE(v); in tuplerepr() 239 if (Py_SIZE(v) > 1) { in tuplerepr() 241 writer.min_length = 1 + 1 + (2 + 1) * (Py_SIZE(v) - 1) + 1; in tuplerepr() 323 Py_ssize_t i, len = Py_SIZE( in tuplehash() [all...] |
H A D | longobject.c | 26 #define IS_MEDIUM_VALUE(x) (((size_t)Py_SIZE(x)) + 1U < 3U) 33 return ((stwodigits)Py_SIZE(x)) * x->ob_digit[0]; in medium_value() 127 Py_ssize_t j = Py_ABS(Py_SIZE(v)); in long_normalize() 133 Py_SET_SIZE(v, (Py_SIZE(v) < 0) ? -(i) : i); in long_normalize() 178 i = Py_SIZE(src); in _PyLong_Copy() 189 Py_SET_SIZE(result, Py_SIZE(src)); in _PyLong_Copy() 277 Py_SET_SIZE(x, -Py_SIZE(x)); in _PyLong_Negate() 426 Py_SET_SIZE(v, -(Py_SIZE(v))); in PyLong_FromDouble() 481 i = Py_SIZE(v); in PyLong_AsLongAndOverflow() 584 i = Py_SIZE( in PyLong_AsSsize_t() [all...] |
H A D | listobject.c | 74 if (newsize - Py_SIZE(self) > (Py_ssize_t)(new_allocated - newsize)) in list_resize() 226 return Py_SIZE(op); in PyList_Size() 249 if (!valid_index(i, Py_SIZE(op))) { in PyList_GetItem() 267 if (!valid_index(i, Py_SIZE(op))) { in PyList_SetItem() 281 Py_ssize_t i, n = Py_SIZE(self); in ins1() 355 i = Py_SIZE(op); in list_dealloc() 386 if (Py_SIZE(v) == 0) { in list_repr() 398 writer.min_length = 1 + 1 + (2 + 1) * (Py_SIZE(v) - 1) + 1; in list_repr() 405 for (i = 0; i < Py_SIZE(v); ++i) { in list_repr() 438 return Py_SIZE( in list_length() [all...] |
H A D | bytearrayobject.c | 55 (void)PyBuffer_FillInfo(view, (PyObject*)obj, ptr, Py_SIZE(obj), 0, flags); in bytearray_getbuffer() 185 if (requested_size == Py_SIZE(self)) { in PyByteArray_Resize() 229 Py_MIN((size_t)requested_size, (size_t)Py_SIZE(self))); in PyByteArray_Resize() 290 return Py_SIZE(self); in bytearray_length() 305 size = Py_SIZE(self); in bytearray_iconcat() 325 const Py_ssize_t mysize = Py_SIZE(self); in bytearray_repeat() 347 const Py_ssize_t mysize = Py_SIZE(self); in bytearray_irepeat() 364 if (i < 0 || i >= Py_SIZE(self)) { in bytearray_getitem() 383 if (i < 0 || i >= Py_SIZE(self)) { in bytearray_subscript() 462 Py_SIZE(sel in bytearray_setslice_linear() [all...] |
H A D | bytesobject.c | 1220 return Py_SIZE(op); in PyBytes_Size() 1303 Py_ssize_t i, length = Py_SIZE(op); in PyBytes_Repr() 1395 return Py_SIZE(a); in bytes_length() 1456 if (n > 0 && Py_SIZE(a) > PY_SSIZE_T_MAX / n) { in bytes_repeat() 1461 size = Py_SIZE(a) * n; in bytes_repeat() 1462 if (size == Py_SIZE(a) && PyBytes_CheckExact(a)) { in bytes_repeat() 1483 _PyBytes_Repeat(op->ob_sval, size, a->ob_sval, Py_SIZE(a)); in bytes_repeat() 1497 if (i < 0 || i >= Py_SIZE(a)) { in bytes_item() 1510 len = Py_SIZE(a); in bytes_compare_eq() 1511 if (Py_SIZE( in bytes_compare_eq() [all...] |
H A D | codeobject.c | 345 while (entry_point < Py_SIZE(co) && in init_code() 740 co->_co_linearray = PyMem_Malloc(Py_SIZE(co)*size); in _PyCode_CreateLineArray() 751 assert(index < (int)Py_SIZE(co)); in _PyCode_CreateLineArray() 1473 deopt_code((_Py_CODEUNIT *)PyBytes_AS_STRING(code), Py_SIZE(co)); in _PyCode_GetCode() 1695 eq = Py_SIZE(co) == Py_SIZE(cp); in code_richcompare() 1699 for (int i = 0; i < Py_SIZE(co); i++) { in code_richcompare() 1860 Py_ssize_t res = _PyObject_VAR_SIZE(Py_TYPE(co), Py_SIZE(co)); in code_sizeof() 2206 deopt_code(_PyCode_CODE(co), Py_SIZE(co)); in _PyStaticCode_Dealloc()
|
H A D | structseq.c | 38 #define VISIBLE_SIZE(op) Py_SIZE(op)
|
H A D | typeobject.c | 1182 n = Py_SIZE(type); in traverse_slots() 1209 if (Py_SIZE(base)) { in subtype_traverse() 1254 n = Py_SIZE(type); in clear_slots() 1279 if (Py_SIZE(base)) in subtype_clear() 1427 if (Py_SIZE(base)) in subtype_dealloc() 5528 res = Py_SIZE(self) * isize; in object___sizeof___impl() 7314 if (Py_SIZE(res) < 0) { in slot_sq_length()
|
/third_party/python/Modules/ |
H A D | arraymodule.c | 133 if (self->ob_exports > 0 && newsize != Py_SIZE(self)) { in array_resize() 145 Py_SIZE(self) < newsize + 16 && in array_resize() 171 _new_size = (newsize >> 4) + (Py_SIZE(self) < 8 ? 3 : 7) + newsize; in array_resize() 632 assert(i>=0 && i<Py_SIZE(ap)); in getarrayitem() 640 Py_ssize_t n = Py_SIZE(self); in ins1() 705 if (Py_SIZE(va) != Py_SIZE(wa) && (op == Py_EQ || op == Py_NE)) { in array_richcompare() 718 Py_ssize_t common_length = Py_MIN(Py_SIZE(va), Py_SIZE(wa)); in array_richcompare() 742 for (i = 0; i < Py_SIZE(v in array_richcompare() [all...] |
H A D | _collectionsmodule.c | 190 if (Py_SIZE(deque) == 0) { in deque_pop() 196 Py_SET_SIZE(deque, Py_SIZE(deque) - 1); in deque_pop() 200 if (Py_SIZE(deque)) { in deque_pop() 227 if (Py_SIZE(deque) == 0) { in deque_popleft() 234 Py_SET_SIZE(deque, Py_SIZE(deque) - 1); in deque_popleft() 238 if (Py_SIZE(deque)) { in deque_popleft() 268 * unsigned test that returns true whenever 0 <= maxlen < Py_SIZE(deque). 271 #define NEEDS_TRIM(deque, maxlen) ((size_t)(maxlen) < (size_t)(Py_SIZE(deque))) 287 Py_SET_SIZE(deque, Py_SIZE(deque) + 1); in deque_append_internal() 324 Py_SET_SIZE(deque, Py_SIZE(dequ in deque_appendleft_internal() [all...] |
H A D | _pickle.c | 453 Py_ssize_t i = Py_SIZE(self); in Pdata_dealloc() 494 Py_ssize_t i = Py_SIZE(self); in Pdata_clear() 550 if (Py_SIZE(self) <= self->fence) { in Pdata_pop() 554 Py_SET_SIZE(self, Py_SIZE(self) - 1); in Pdata_pop() 555 return self->data[Py_SIZE(self)]; in Pdata_pop() 562 if (Py_SIZE(self) == self->allocated && Pdata_grow(self) < 0) { in Pdata_push() 565 self->data[Py_SIZE(self)] = obj; in Pdata_push() 566 Py_SET_SIZE(self, Py_SIZE(self) + 1); in Pdata_push() 589 len = Py_SIZE(self) - start; in Pdata_poptuple() 606 len = Py_SIZE(sel in Pdata_poplist() [all...] |
H A D | mathmodule.c | 893 if (Py_SIZE(a) == 0 || Py_SIZE(b) == 0) { in long_lcm() 2323 if (Py_SIZE(arg) <= 0) { in loghelper() 3594 if (Py_SIZE(n) < 0) { in math_perm_impl() 3599 if (Py_SIZE(k) < 0) { in math_perm_impl() 3686 if (Py_SIZE(n) < 0) { in math_comb_impl() 3691 if (Py_SIZE(k) < 0) { in math_comb_impl() 3723 if (Py_SIZE(temp) < 0) { in math_comb_impl()
|
/third_party/python/Include/internal/ |
H A D | pycore_blocks_output_buffer.h | 193 const Py_ssize_t list_len = Py_SIZE(buffer->list); in _BlocksOutputBuffer_Grow() 265 const Py_ssize_t list_len = Py_SIZE(buffer->list); in _BlocksOutputBuffer_Finish() 269 (list_len == 2 && Py_SIZE(PyList_GET_ITEM(buffer->list, 1)) == avail_out)) in _BlocksOutputBuffer_Finish() 293 memcpy(posi, PyBytes_AS_STRING(block), Py_SIZE(block)); in _BlocksOutputBuffer_Finish() 294 posi += Py_SIZE(block); in _BlocksOutputBuffer_Finish() 298 memcpy(posi, PyBytes_AS_STRING(block), Py_SIZE(block) - avail_out); in _BlocksOutputBuffer_Finish() 300 assert(Py_SIZE(result) == 0); in _BlocksOutputBuffer_Finish()
|
H A D | pycore_code.h | 550 assert(index < Py_SIZE(co)); in _PyCode_LineNumberFromArray()
|
/third_party/python/Python/ |
H A D | hamt.c | 567 return Py_SIZE(node) / 2; in hamt_node_bitmap_count() 578 clone = (PyHamtNode_Bitmap *)hamt_node_bitmap_new(Py_SIZE(node)); in hamt_node_bitmap_clone() 583 for (i = 0; i < Py_SIZE(node); i++) { in hamt_node_bitmap_clone() 599 Py_SIZE(o) - 2); in hamt_node_bitmap_clone_without() 614 assert(Py_SIZE(o) >= 0 && Py_SIZE(o) <= 32); in hamt_node_bitmap_clone_without() 615 for (i = val_idx + 1; i < (uint32_t)Py_SIZE(o); i++) { in hamt_node_bitmap_clone_without() 708 where `N < Py_SIZE(node)`. in hamt_node_bitmap_assoc() 723 assert(val_idx < (size_t)Py_SIZE(self)); in hamt_node_bitmap_assoc() 942 assert(Py_SIZE(sel in hamt_node_bitmap_assoc() [all...] |
H A D | ast_opt.c | 155 if (PyLong_Check(v) && PyLong_Check(w) && Py_SIZE(v) && Py_SIZE(w)) { in safe_multiply() 201 if (PyLong_Check(v) && PyLong_Check(w) && Py_SIZE(v) && Py_SIZE(w) > 0) { in safe_power() 218 if (PyLong_Check(v) && PyLong_Check(w) && Py_SIZE(v) && Py_SIZE(w)) { in safe_lshift()
|
H A D | specialize.c | 265 for (int i = 0; i < Py_SIZE(code); i++) { in _PyCode_Quicken() 1271 if ((Py_SIZE(sub) == 0 || Py_SIZE(sub) == 1) in _Py_Specialize_StoreSubscr() 1303 if (PyLong_CheckExact(sub) && (((size_t)Py_SIZE(sub)) > 1)) { in _Py_Specialize_StoreSubscr() 1950 if (Py_ABS(Py_SIZE(lhs)) <= 1 && Py_ABS(Py_SIZE(rhs)) <= 1) { in _Py_Specialize_CompareOp()
|
H A D | marshal.c | 235 if (Py_SIZE(ob) == 0) { in w_PyLong() 241 n = Py_ABS(Py_SIZE(ob)); in w_PyLong() 254 w_long((long)(Py_SIZE(ob) > 0 ? l : -l), p); in w_PyLong()
|
H A D | ceval.c | 2174 Py_ssize_t signed_magnitude = Py_SIZE(sub); 2199 Py_ssize_t signed_magnitude = Py_SIZE(sub); 2342 DEOPT_IF(((size_t)Py_SIZE(sub)) > 1, STORE_SUBSCR); 3785 DEOPT_IF((size_t)(Py_SIZE(left) + 1) > 2, COMPARE_OP); 3786 DEOPT_IF((size_t)(Py_SIZE(right) + 1) > 2, COMPARE_OP); 3788 assert(Py_ABS(Py_SIZE(left)) <= 1 && Py_ABS(Py_SIZE(right)) <= 1); 3789 Py_ssize_t ileft = Py_SIZE(left) * ((PyLongObject *)left)->ob_digit[0]; 3790 Py_ssize_t iright = Py_SIZE(right) * ((PyLongObject *)right)->ob_digit[0];
|
/third_party/python/Include/cpython/ |
H A D | bytearrayobject.h | 23 if (Py_SIZE(self)) { in PyByteArray_AS_STRING() 34 return Py_SIZE(self); in PyByteArray_GET_SIZE()
|
H A D | tupleobject.h | 24 return Py_SIZE(tuple); in PyTuple_GET_SIZE()
|
H A D | listobject.h | 35 return Py_SIZE(list); in PyList_GET_SIZE()
|
H A D | bytesobject.h | 45 return Py_SIZE(self); in PyBytes_GET_SIZE()
|
H A D | code.h | 145 #define _PyCode_NBYTES(CO) (Py_SIZE(CO) * (Py_ssize_t)sizeof(_Py_CODEUNIT))
|
/third_party/python/Include/ |
H A D | object.h | 140 static inline Py_ssize_t Py_SIZE(PyObject *ob) { in Py_SIZE() function 145 # define Py_SIZE(ob) Py_SIZE(_PyObject_CAST(ob)) macro
|