diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-09 23:51:54 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-09 23:51:54 +0200 |
commit | 16fad0ce0d06f5e11b46f37eadbb060256b90540 (patch) | |
tree | 33dd5bc188824aa8ae498a3351dd330ee2c85bb8 /Python/asdl.c | |
parent | c823f3ffde59b90df6ef240ece057d4da20e580e (diff) | |
parent | 27c856cc1a76a2448283d4a98fa74a268a097c59 (diff) | |
download | cpython-16fad0ce0d06f5e11b46f37eadbb060256b90540.tar.gz |
Issue #28649: Clear the typing module caches when search for reference leaks.
Diffstat (limited to 'Python/asdl.c')
-rw-r--r-- | Python/asdl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/asdl.c b/Python/asdl.c index df387b2119..c211078118 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; } |