Index: Python/ast.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v retrieving revision 1.1.2.55 diff -c -w -r1.1.2.55 ast.c *** Python/ast.c 16 Jan 2005 17:09:11 -0000 1.1.2.55 --- Python/ast.c 20 Mar 2005 09:18:35 -0000 *************** *** 2344,2351 **** #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); else x = PyOS_strtol((char *)s, (char **)&end, 0); if (*end == '\0') { --- 2344,2355 ---- #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); if (*end == '\0') {