summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 057b64df32..434236b307 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3067,16 +3067,7 @@ parsenumber(const char *s)
#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);