Home
last modified time | relevance | path

Searched refs:PY_SSIZE_T_MAX (Results 1 - 25 of 93) sorted by relevance

1234

/third_party/python/Objects/stringlib/
H A 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()
297 /* Can't overflow: self_len + 1 <= maxcount <= PY_SSIZE_T_MAX. */ in stringlib_replace_interleave()
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()
H A Djoin.h89 if (itemlen > PY_SSIZE_T_MAX - sz) { in bytes_join()
96 if (seplen > PY_SSIZE_T_MAX - sz) { in bytes_join()
/third_party/python/Include/
H A Dpymem.h68 ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
78 ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
H A Dpyport.h126 * PY_SSIZE_T_MAX is the largest positive value of type Py_ssize_t.
132 # define PY_SSIZE_T_MAX SSIZE_MAX macro
135 # define PY_SSIZE_T_MAX INTPTR_MAX macro
141 #define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1)
/third_party/python/Modules/_sre/
H A Dsre.h23 # define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX)
24 # define SRE_MAXGROUPS ((SRE_CODE)PY_SSIZE_T_MAX / SIZEOF_VOID_P / 2)
/third_party/python/Lib/test/test_capi/
H A Dtest_structmembers.py13 PY_SSIZE_T_MAX, PY_SSIZE_T_MIN namespace
72 ts.T_PYSSIZET = PY_SSIZE_T_MAX
73 self.assertEqual(ts.T_PYSSIZET, PY_SSIZE_T_MAX)
/third_party/python/Objects/
H A Dsliceobject.c209 static_assert(PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX, in PySlice_Unpack()
210 "-PY_SSIZE_T_MAX < PY_SSIZE_T_MIN + 1"); in PySlice_Unpack()
222 /* Here *step might be -PY_SSIZE_T_MAX-1; in this case we replace it in PySlice_Unpack()
223 * with -PY_SSIZE_T_MAX. This doesn't affect the semantics, and it in PySlice_Unpack()
227 if (*step < -PY_SSIZE_T_MAX) in PySlice_Unpack()
228 *step = -PY_SSIZE_T_MAX; in PySlice_Unpack()
232 *start = *step < 0 ? PY_SSIZE_T_MAX : 0; in PySlice_Unpack()
239 *stop = *step < 0 ? PY_SSIZE_T_MIN : PY_SSIZE_T_MAX; in PySlice_Unpack()
255 assert(step >= -PY_SSIZE_T_MAX); in PySlice_AdjustIndices()
H A Dbytearrayobject.c120 if (size == PY_SSIZE_T_MAX) { in PyByteArray_FromStringAndSize()
217 if (alloc > PY_SSIZE_T_MAX) { in PyByteArray_Resize()
263 if (va.len > PY_SSIZE_T_MAX - vb.len) { in PyByteArray_Concat()
306 if (size > PY_SSIZE_T_MAX - vo.len) { in bytearray_iconcat()
326 if (count > 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_repeat()
348 if (count > 0 && mysize > PY_SSIZE_T_MAX / count) in bytearray_irepeat()
487 if (Py_SIZE(self) > (Py_ssize_t)PY_SSIZE_T_MAX - growth) { in bytearray_setslice_linear()
949 if (length > (PY_SSIZE_T_MAX - 6 - newsize) / 4) { in bytearray_repr()
1448 maxsplit = PY_SSIZE_T_MAX; in bytearray_split_impl()
1559 maxsplit = PY_SSIZE_T_MAX; in bytearray_rsplit_impl()
[all...]
H A Dobmalloc.c579 * Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes. in PyMem_RawMalloc()
584 if (size > (size_t)PY_SSIZE_T_MAX) in PyMem_RawMalloc()
593 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize) in PyMem_RawCalloc()
602 if (new_size > (size_t)PY_SSIZE_T_MAX) in PyMem_RawRealloc()
617 if (size > (size_t)PY_SSIZE_T_MAX) in PyMem_Malloc()
630 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize) in PyMem_Calloc()
643 if (new_size > (size_t)PY_SSIZE_T_MAX) in PyMem_Realloc()
662 if (len > (size_t)PY_SSIZE_T_MAX / sizeof(wchar_t) - 1) { in _PyMem_RawWcsdup()
706 if (size > (size_t)PY_SSIZE_T_MAX) in PyObject_Malloc()
719 if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsiz in PyObject_Calloc()
[all...]
H A Dbytes_methods.c515 Py_ssize_t start = 0, end = PY_SSIZE_T_MAX; in Py_LOCAL_INLINE()
662 Py_ssize_t start = 0, end = PY_SSIZE_T_MAX; in _Py_bytes_count()
686 stringlib_count(str + start, end - start, sub, sub_len, PY_SSIZE_T_MAX) in _Py_bytes_count()
775 Py_ssize_t end = PY_SSIZE_T_MAX; in _Py_bytes_tailmatch()
/third_party/python/Lib/test/
H A Dtest_ucn.py18 from _testcapi import INT_MAX, PY_SSIZE_T_MAX, UINT_MAX namespace
20 INT_MAX = PY_SSIZE_T_MAX = UINT_MAX = 2**64 - 1
228 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
H A Dtest_clinic.py1040 from _testcapi import PY_SSIZE_T_MIN, PY_SSIZE_T_MAX namespace
1044 ac_tester.py_ssize_t_converter(PY_SSIZE_T_MAX + 1)
1051 from _testcapi import PY_SSIZE_T_MIN, PY_SSIZE_T_MAX namespace
1056 self.assertEqual(ac_tester.slice_index_converter(PY_SSIZE_T_MAX, PY_SSIZE_T_MAX + 1, PY_SSIZE_T_MAX + 1234),
1057 (PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX))
H A Dtest_tcl.py20 from _testcapi import INT_MAX, PY_SSIZE_T_MAX namespace
22 INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
675 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
682 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
707 @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX, "needs UINT_MAX < SIZE_MAX")
/third_party/python/PC/
H A Dpyconfig.h175 # define PY_SSIZE_T_MAX LLONG_MAX macro
178 # define PY_SSIZE_T_MAX INT_MAX macro
/third_party/python/Modules/_io/
H A 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()
/third_party/python/Modules/_sre/clinic/
H A Dsre.c.h184 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_match()
254 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_fullmatch()
326 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_search()
395 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_findall()
467 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_finditer()
536 Py_ssize_t endpos = PY_SSIZE_T_MAX; in _sre_SRE_Pattern_scanner()
/third_party/python/Python/
H A Dcodecs.c91 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()
1001 if (ressize > PY_SSIZE_T_MAX - replsize) in PyCodec_NameReplaceErrors()
1161 if (end - start > PY_SSIZE_T_MAX / bytelength) in PyCodec_SurrogatePassErrors()
1162 end = start + PY_SSIZE_T_MAX / bytelength; in PyCodec_SurrogatePassErrors()
/third_party/node/deps/v8/third_party/markupsafe/
H A D_speedups.c19 #define PY_SSIZE_T_MAX INT_MAX macro
/third_party/node/tools/inspector_protocol/markupsafe/
H A D_speedups.c19 #define PY_SSIZE_T_MAX INT_MAX macro
/third_party/skia/third_party/externals/markupsafe/
H A D_speedups.c19 #define PY_SSIZE_T_MAX INT_MAX macro
/third_party/python/Include/internal/
H A Dpycore_fileutils.h56 /* write() should truncate the input to PY_SSIZE_T_MAX bytes,
58 # define _PY_READ_MAX PY_SSIZE_T_MAX
59 # define _PY_WRITE_MAX PY_SSIZE_T_MAX
H A Dpycore_list.h50 assert((size_t)len + 1 < PY_SSIZE_T_MAX); in _PyList_AppendTakeRef()
/third_party/python/Modules/
H A Dgrpmodule.c149 if (bufsize > (PY_SSIZE_T_MAX >> 1)) { in grp_getgrgid_impl()
230 if (bufsize > (PY_SSIZE_T_MAX >> 1)) { in grp_getgrnam_impl()
H A Dpwdmodule.c169 if (bufsize > (PY_SSIZE_T_MAX >> 1)) { in pwd_getpwuid()
252 if (bufsize > (PY_SSIZE_T_MAX >> 1)) { in pwd_getpwnam_impl()
H A Dmmapmodule.c306 Py_ssize_t num_bytes = PY_SSIZE_T_MAX, remaining; in mmap_read_method()
521 if (new_size < 0 || PY_SSIZE_T_MAX - new_size < self->offset) { in mmap_resize_method()
716 if (PY_SSIZE_T_MAX - self->pos < dist) in mmap_seek_method()
721 if (PY_SSIZE_T_MAX - self->size < dist) in mmap_seek_method()
872 if (PY_SSIZE_T_MAX - start < length) { in mmap_madvise_method()
1307 if (status.st_size - offset > PY_SSIZE_T_MAX) { in new_mmap_object()
1516 if (size - offset > PY_SSIZE_T_MAX) { in new_mmap_object()

Completed in 22 milliseconds

1234