summaryrefslogtreecommitdiffstats
path: root/Python/asdl.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 /Python/asdl.c
parentc75abff53375bbd9f1536de4069854cea4933c42 (diff)
downloadcpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.zip
cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.gz
cpython-2f8bfef1587b3e8f43c0ce7cd9546137c5b56782.tar.bz2
replace PY_SIZE_MAX with SIZE_MAX
Diffstat (limited to 'Python/asdl.c')
-rw-r--r--Python/asdl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/asdl.c b/Python/asdl.c
index df387b2..c211078 100644
--- a/Python/asdl.c
+++ b/Python/asdl.c
@@ -9,14 +9,14 @@ _Py_asdl_seq_new(Py_ssize_t size, PyArena *arena)
/* check size is sane */
if (size < 0 ||
- (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
+ (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) {
PyErr_NoMemory();
return NULL;
}
n = (size ? (sizeof(void *) * (size - 1)) : 0);
/* check if size can be added safely */
- if (n > PY_SIZE_MAX - sizeof(asdl_seq)) {
+ if (n > SIZE_MAX - sizeof(asdl_seq)) {
PyErr_NoMemory();
return NULL;
}
@@ -40,14 +40,14 @@ _Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena)
/* check size is sane */
if (size < 0 ||
- (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
+ (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) {
PyErr_NoMemory();
return NULL;
}
n = (size ? (sizeof(void *) * (size - 1)) : 0);
/* check if size can be added safely */
- if (n > PY_SIZE_MAX - sizeof(asdl_seq)) {
+ if (n > SIZE_MAX - sizeof(asdl_seq)) {
PyErr_NoMemory();
return NULL;
}