Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 47977:c0ab2bafb264 legacy-trunk
Issue #3360: Fix incorrect parsing of "020000000000.0".
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Wed, 16 Jul 2008 09:40:03 +0000 |
| parents | 80109d4044cd |
| children | 49f52e285a64 |
line wrap: on
line diff
--- a/Python/ast.c Wed Jul 16 05:28:26 2008 +0000 +++ b/Python/ast.c Wed Jul 16 09:40:03 2008 +0000 @@ -3139,16 +3139,7 @@ #endif if (*end == 'l' || *end == 'L') return PyLong_FromString((char *)s, (char **)0, 0); - if (s[0] == '0') { - x = (long) PyOS_strtoul((char *)s, (char **)&end, 0); - if (x < 0 && errno == 0) { - return PyLong_FromString((char *)s, - (char **)0, - 0); - } - } - else - x = PyOS_strtol((char *)s, (char **)&end, 0); + x = PyOS_strtol((char *)s, (char **)&end, 0); if (*end == '\0') { if (errno != 0) return PyLong_FromString((char *)s, (char **)0, 0);
