diff options
author | 2015-09-06 21:25:30 +0300 | |
---|---|---|
committer | 2015-09-06 21:25:30 +0300 | |
commit | 56f6e76c680f47ad2b11bed9406305a000a1889a (patch) | |
tree | 072b1cbb10bcc6a2f1ddf761c5bf49a8b447a560 /Python/Python-ast.c | |
parent | Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. (diff) | |
download | cpython-56f6e76c680f47ad2b11bed9406305a000a1889a.tar.gz cpython-56f6e76c680f47ad2b11bed9406305a000a1889a.tar.bz2 cpython-56f6e76c680f47ad2b11bed9406305a000a1889a.zip |
Issue #15989: Fixed some scarcely probable integer overflows.
It is very unlikely that they can occur in real code for now.
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 8a2dc7cc54d..fd7f17e85bc 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -769,7 +769,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena) return 1; } - i = (int)PyLong_AsLong(obj); + i = _PyLong_AsInt(obj); if (i == -1 && PyErr_Occurred()) return 1; *out = i; |