Home
last modified time | relevance | path

Searched refs:PY_SSIZE_T_MAX (Results 1 – 25 of 150) sorted by relevance

123456

/external/python/cpython2/Include/
Dpymem.h74 #define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
76 #define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
93 ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
96 ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
106 ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
109 ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
/external/python/cpython3/Include/
Dpymem.h79 ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
82 ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
92 ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
95 ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
/external/python/cpython2/Objects/
Dsliceobject.c140 assert(PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX); in _PySlice_Unpack()
157 if (*step < -PY_SSIZE_T_MAX) in _PySlice_Unpack()
158 *step = -PY_SSIZE_T_MAX; in _PySlice_Unpack()
162 *start = *step < 0 ? PY_SSIZE_T_MAX : 0; in _PySlice_Unpack()
169 *stop = *step < 0 ? PY_SSIZE_T_MIN : PY_SSIZE_T_MAX; in _PySlice_Unpack()
185 assert(step >= -PY_SSIZE_T_MAX); in _PySlice_AdjustIndices()
Dbytearrayobject.c308 if (va.len > PY_SSIZE_T_MAX - vb.len) { in PyByteArray_Concat()
350 if (mysize > PY_SSIZE_T_MAX - vo.len) { in bytearray_iconcat()
379 if (count != 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_repeat()
404 if (count != 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_irepeat()
951 if (length > (PY_SSIZE_T_MAX - 14) / 4) { in bytearray_repr()
1179 Py_ssize_t start=0, end=PY_SSIZE_T_MAX; in bytearray_find_internal()
1229 Py_ssize_t start = 0, end = PY_SSIZE_T_MAX; in bytearray_count()
1242 stringlib_count(str + start, end - start, vsub.buf, vsub.len, PY_SSIZE_T_MAX) in bytearray_count()
1387 Py_ssize_t end = PY_SSIZE_T_MAX; in bytearray_startswith()
1426 Py_ssize_t end = PY_SSIZE_T_MAX; in bytearray_endswith()
[all …]
Denumobject.c38 en->en_index = PY_SSIZE_T_MAX; in enum_new()
89 en->en_longindex = PyInt_FromSsize_t(PY_SSIZE_T_MAX); in enum_next_long()
140 if (en->en_index == PY_SSIZE_T_MAX) in enum_next()
/external/python/cpython2/Modules/
Dstropmodule.c219 if (slen > PY_SSIZE_T_MAX - reslen || in strop_joinfields()
220 seplen > PY_SSIZE_T_MAX - reslen - seplen) { in strop_joinfields()
263 if (slen > PY_SSIZE_T_MAX - reslen || in strop_joinfields()
264 seplen > PY_SSIZE_T_MAX - reslen - seplen) { in strop_joinfields()
307 Py_ssize_t len, n, i = 0, last = PY_SSIZE_T_MAX; in strop_find()
351 Py_ssize_t i = 0, last = PY_SSIZE_T_MAX; in strop_rfind()
618 if (j > PY_SSIZE_T_MAX - incr) in strop_expandtabs()
622 if (j > PY_SSIZE_T_MAX - 1) in strop_expandtabs()
626 if (i > PY_SSIZE_T_MAX - j) in strop_expandtabs()
634 if (i > PY_SSIZE_T_MAX - j) in strop_expandtabs()
[all …]
Dsre.h23 # define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX)
30 # define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX)
Dbinascii.c144 #define BASE64_MAXBIN (PY_SSIZE_T_MAX/2 - sizeof(PyStringObject) - 3)
378 if (ascii_len > PY_SSIZE_T_MAX - 3) { in binascii_a2b_base64()
550 if (len > PY_SSIZE_T_MAX - 2) { in binascii_a2b_hqx()
630 if (len > PY_SSIZE_T_MAX / 2 - 2) { in binascii_rlecode_hqx()
694 if (len > PY_SSIZE_T_MAX / 2 - 2) { in binascii_b2a_hqx()
752 else if (in_len > PY_SSIZE_T_MAX / 2) { in binascii_rledecode_hqx()
784 if ( out_len > PY_SSIZE_T_MAX / 2) return PyErr_NoMemory(); \ in binascii_rledecode_hqx()
1055 if (arglen > PY_SSIZE_T_MAX / 2) { in binascii_hexlify()
1379 if (PY_SSIZE_T_MAX - delta < odatalen) { in binascii_b2a_qp()
/external/python/cpython2/Objects/stringlib/
Dtransmogrify.h32 if (j > PY_SSIZE_T_MAX - incr) in stringlib_expandtabs()
38 if (j > PY_SSIZE_T_MAX - 1) in stringlib_expandtabs()
42 if (i > PY_SSIZE_T_MAX - j) in stringlib_expandtabs()
50 if (i > PY_SSIZE_T_MAX - j) in stringlib_expandtabs()
/external/python/cpython3/Objects/stringlib/
Dtransmogrify.h53 if (j > PY_SSIZE_T_MAX - incr) in stringlib_expandtabs_impl()
59 if (j > PY_SSIZE_T_MAX - 1) in stringlib_expandtabs_impl()
63 if (i > PY_SSIZE_T_MAX - j) in stringlib_expandtabs_impl()
71 if (i > PY_SSIZE_T_MAX - j) in stringlib_expandtabs_impl()
304 if (to_len > (PY_SSIZE_T_MAX - self_len) / count) { in stringlib_replace_interleave()
568 if (to_len - 1 > (PY_SSIZE_T_MAX - self_len) / count) { in stringlib_replace_single_character()
635 if (to_len - from_len > (PY_SSIZE_T_MAX - self_len) / count) { in stringlib_replace_substring()
688 maxcount = PY_SSIZE_T_MAX; in stringlib_replace()
Djoin.h89 if (itemlen > PY_SSIZE_T_MAX - sz) { in STRINGLIB()
96 if (seplen > PY_SSIZE_T_MAX - sz) { in STRINGLIB()
/external/python/cpython3/Modules/
Dsre.h23 # define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX)
24 # define SRE_MAXGROUPS ((SRE_CODE)PY_SSIZE_T_MAX / SIZEOF_SIZE_T / 2)
/external/python/cpython2/Lib/test/
Dtest_ucn.py16 from _testcapi import INT_MAX, PY_SSIZE_T_MAX, UINT_MAX
18 INT_MAX = PY_SSIZE_T_MAX = UINT_MAX = 2**64 - 1
147 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
/external/python/cpython3/Lib/test/
Dtest_structmembers.py12 PY_SSIZE_T_MAX, PY_SSIZE_T_MIN
71 ts.T_PYSSIZET = PY_SSIZE_T_MAX
72 self.assertEqual(ts.T_PYSSIZET, PY_SSIZE_T_MAX)
Dtest_ucn.py17 from _testcapi import INT_MAX, PY_SSIZE_T_MAX, UINT_MAX
19 INT_MAX = PY_SSIZE_T_MAX = UINT_MAX = 2**64 - 1
227 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
/external/python/cpython3/Objects/
Dsliceobject.c203 Py_BUILD_ASSERT(PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX); in PySlice_Unpack()
220 if (*step < -PY_SSIZE_T_MAX) in PySlice_Unpack()
221 *step = -PY_SSIZE_T_MAX; in PySlice_Unpack()
225 *start = *step < 0 ? PY_SSIZE_T_MAX : 0; in PySlice_Unpack()
232 *stop = *step < 0 ? PY_SSIZE_T_MIN : PY_SSIZE_T_MAX; in PySlice_Unpack()
248 assert(step >= -PY_SSIZE_T_MAX); in PySlice_AdjustIndices()
Dbytearrayobject.c126 if (size == PY_SSIZE_T_MAX) { in PyByteArray_FromStringAndSize()
223 if (alloc > PY_SSIZE_T_MAX) { in PyByteArray_Resize()
269 if (va.len > PY_SSIZE_T_MAX - vb.len) { in PyByteArray_Concat()
312 if (size > PY_SSIZE_T_MAX - vo.len) { in bytearray_iconcat()
336 if (count > 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_repeat()
362 if (count > 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_irepeat()
507 if (Py_SIZE(self) > (Py_ssize_t)PY_SSIZE_T_MAX - growth) { in bytearray_setslice_linear()
928 if (length > (PY_SSIZE_T_MAX - 6 - newsize) / 4) { in bytearray_repr()
1432 maxsplit = PY_SSIZE_T_MAX; in bytearray_split_impl()
1543 maxsplit = PY_SSIZE_T_MAX; in bytearray_rsplit_impl()
[all …]
Dobmalloc.c570 if (size > (size_t)PY_SSIZE_T_MAX) in PyMem_RawMalloc()
579 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize) in PyMem_RawCalloc()
588 if (new_size > (size_t)PY_SSIZE_T_MAX) in PyMem_RawRealloc()
603 if (size > (size_t)PY_SSIZE_T_MAX) in PyMem_Malloc()
612 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize) in PyMem_Calloc()
621 if (new_size > (size_t)PY_SSIZE_T_MAX) in PyMem_Realloc()
639 if (len > (size_t)PY_SSIZE_T_MAX / sizeof(wchar_t) - 1) { in _PyMem_RawWcsdup()
683 if (size > (size_t)PY_SSIZE_T_MAX) in PyObject_Malloc()
692 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize) in PyObject_Calloc()
701 if (new_size > (size_t)PY_SSIZE_T_MAX) in PyObject_Realloc()
[all …]
Denumobject.c58 en->en_index = PY_SSIZE_T_MAX; in enum_new_impl()
110 en->en_longindex = PyLong_FromSsize_t(PY_SSIZE_T_MAX); in enum_next_long()
160 if (en->en_index == PY_SSIZE_T_MAX) in enum_next()
/external/python/cpython3/Doc/c-api/
Dslice.rst92 C integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to
93 ``PY_SSIZE_T_MAX``, silently boost the start and stop values less than
95 values less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``.
/external/python/cpython3/Include/cpython/
Dfileutils.h47 # define _PY_READ_MAX PY_SSIZE_T_MAX
48 # define _PY_WRITE_MAX PY_SSIZE_T_MAX
/external/python/cpython2/Modules/_io/
Dbytesio.c49 assert(self->pos < PY_SSIZE_T_MAX - len); in get_line()
70 if (size > PY_SSIZE_T_MAX) in resize_buffer()
421 assert(self->pos + len < PY_SSIZE_T_MAX); in bytesio_readinto()
527 if (pos > PY_SSIZE_T_MAX - self->pos) { in bytesio_seek()
535 if (pos > PY_SSIZE_T_MAX - self->string_size) { in bytesio_seek()
/external/python/cpython3/Python/
Dcodecs.c65 if (len > PY_SSIZE_T_MAX) { in normalizestring()
770 if (end - start > PY_SSIZE_T_MAX / (2+7+1)) in PyCodec_XMLCharRefReplaceErrors()
771 end = start + PY_SSIZE_T_MAX / (2+7+1); in PyCodec_XMLCharRefReplaceErrors()
909 if (end - start > PY_SSIZE_T_MAX / (1+1+8)) in PyCodec_BackslashReplaceErrors()
910 end = start + PY_SSIZE_T_MAX / (1+1+8); in PyCodec_BackslashReplaceErrors()
1000 if (ressize > PY_SSIZE_T_MAX - replsize) in PyCodec_NameReplaceErrors()
1160 if (end - start > PY_SSIZE_T_MAX / bytelength) in PyCodec_SurrogatePassErrors()
1161 end = start + PY_SSIZE_T_MAX / bytelength; in PyCodec_SurrogatePassErrors()
/external/python/cpython2/Modules/_multiprocessing/
Dconnection.h148 Py_ssize_t res, maxlength = PY_SSIZE_T_MAX; in connection_recvbytes()
216 &freeme, PY_SSIZE_T_MAX); in connection_recvbytes_into()
302 &freeme, PY_SSIZE_T_MAX); in connection_recv_obj()
/external/python/cpython3/Modules/_io/
Dbytesio.c97 assert(self->pos < PY_SSIZE_T_MAX - len); in scan_eol()
135 if (size > PY_SSIZE_T_MAX) in resize_buffer()
581 assert(self->pos + len < PY_SSIZE_T_MAX); in _io_BytesIO_readinto_impl()
667 if (pos > PY_SSIZE_T_MAX - self->pos) { in _io_BytesIO_seek_impl()
675 if (pos > PY_SSIZE_T_MAX - self->string_size) { in _io_BytesIO_seek_impl()

123456