diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-07 16:26:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-07 16:26:18 (GMT) |
commit | 2f8bfef1587b3e8f43c0ce7cd9546137c5b56782 (patch) | |
tree | 44becf9ee303c3cd1e8977fbda8cbbe42237258a /Modules | |
parent | c75abff53375bbd9f1536de4069854cea4933c42 (diff) | |
download | cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.zip cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.gz cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.bz2 |
replace PY_SIZE_MAX with SIZE_MAX
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_elementtree.c | 2 | ||||
-rw-r--r-- | Modules/_tkinter.c | 2 | ||||
-rw-r--r-- | Modules/_tracemalloc.c | 4 | ||||
-rw-r--r-- | Modules/audioop.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index ca5ab2c..dd8417a 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -1787,7 +1787,7 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value) step = -step; } - assert((size_t)slicelen <= PY_SIZE_MAX / sizeof(PyObject *)); + assert((size_t)slicelen <= SIZE_MAX / sizeof(PyObject *)); /* recycle is a list that will contain all the children * scheduled for removal. diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 8afc4d5..21f063d 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -976,7 +976,7 @@ static PyType_Spec PyTclObject_Type_spec = { }; -#if PY_SIZE_MAX > INT_MAX +#if SIZE_MAX > INT_MAX #define CHECK_STRING_LENGTH(s) do { \ if (s != NULL && strlen(s) >= INT_MAX) { \ PyErr_SetString(PyExc_OverflowError, "string is too long"); \ diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 1a53cfe..ec8bd96 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -655,7 +655,7 @@ tracemalloc_add_trace(_PyTraceMalloc_domain_t domain, uintptr_t ptr, } } - assert(tracemalloc_traced_memory <= PY_SIZE_MAX - size); + assert(tracemalloc_traced_memory <= SIZE_MAX - size); tracemalloc_traced_memory += size; if (tracemalloc_traced_memory > tracemalloc_peak_traced_memory) tracemalloc_peak_traced_memory = tracemalloc_traced_memory; @@ -672,7 +672,7 @@ tracemalloc_alloc(int use_calloc, void *ctx, size_t nelem, size_t elsize) PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx; void *ptr; - assert(elsize == 0 || nelem <= PY_SIZE_MAX / elsize); + assert(elsize == 0 || nelem <= SIZE_MAX / elsize); if (use_calloc) ptr = alloc->calloc(alloc->ctx, nelem, elsize); diff --git a/Modules/audioop.c b/Modules/audioop.c index d715783..44e5198 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -1337,7 +1337,7 @@ audioop_ratecv_impl(PyObject *module, Py_buffer *fragment, int width, weightA /= d; weightB /= d; - if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) { + if ((size_t)nchannels > SIZE_MAX/sizeof(int)) { PyErr_SetString(PyExc_MemoryError, "not enough memory for output buffer"); return NULL; |