replace PY_SIZE_MAX with SIZE_MAX
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 @@
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 @@
};
-#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 @@
}
}
- 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 @@
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 @@
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;