summaryrefslogtreecommitdiffstats
path: root/Modules/_tracemalloc.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-07 16:26:18 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-07 16:26:18 (GMT)
commit2f8bfef1587b3e8f43c0ce7cd9546137c5b56782 (patch)
tree44becf9ee303c3cd1e8977fbda8cbbe42237258a /Modules/_tracemalloc.c
parentc75abff53375bbd9f1536de4069854cea4933c42 (diff)
downloadcpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.zip
cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.gz
cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.bz2
replace PY_SIZE_MAX with SIZE_MAX
Diffstat (limited to 'Modules/_tracemalloc.c')
-rw-r--r--Modules/_tracemalloc.c4
1 files changed, 2 insertions, 2 deletions
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);