diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-19 18:03:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-19 18:03:34 (GMT) |
commit | c679227e31245b0e8dec74a1f7cc77710541d985 (patch) | |
tree | 0ed52ac2bd85d0cad42e39aec5437a603750425b /Python/ast.c | |
parent | 80ab13067e9b8fbd02a05a4863e26b04938b77f5 (diff) | |
download | cpython-c679227e31245b0e8dec74a1f7cc77710541d985.zip cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.gz cpython-c679227e31245b0e8dec74a1f7cc77710541d985.tar.bz2 |
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Python/ast.c b/Python/ast.c index 9ffe3c7..3bd24fd 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3651,18 +3651,16 @@ parsenumber(struct compiling *c, const char *s) end = s + strlen(s) - 1; imflag = *end == 'j' || *end == 'J'; if (s[0] == '0') { - x = (long) PyOS_strtoul((char *)s, (char **)&end, 0); + x = (long) PyOS_strtoul(s, (char **)&end, 0); if (x < 0 && errno == 0) { - return PyLong_FromString((char *)s, - (char **)0, - 0); + return PyLong_FromString(s, (char **)0, 0); } } else - x = PyOS_strtol((char *)s, (char **)&end, 0); + x = PyOS_strtol(s, (char **)&end, 0); if (*end == '\0') { if (errno != 0) - return PyLong_FromString((char *)s, (char **)0, 0); + return PyLong_FromString(s, (char **)0, 0); return PyLong_FromLong(x); } /* XXX Huge floats may silently fail */ @@ -3685,8 +3683,8 @@ parsenumber(struct compiling *c, const char *s) static PyObject * decode_utf8(struct compiling *c, const char **sPtr, const char *end) { - char *s, *t; - t = s = (char *)*sPtr; + const char *s, *t; + t = s = *sPtr; /* while (s < end && *s != '\\') s++; */ /* inefficient for u".." */ while (s < end && (*s & 0x80)) s++; *sPtr = s; |