diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-09 15:28:59 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-09 15:28:59 +0000 |
commit | 22ad24528ecbb856109d4cbc19ee88aa111b4c1b (patch) | |
tree | 91688b6a99085d3dfe27cbf5c8aa06a1be1b9838 | |
parent | 0b481ca321da7c9517f7e7598cc5404cfddad7a8 (diff) | |
download | cpython-git-22ad24528ecbb856109d4cbc19ee88aa111b4c1b.tar.gz |
Merged revisions 85342 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85342 | antoine.pitrou | 2010-10-09 17:24:28 +0200 (sam., 09 oct. 2010) | 4 lines
Issue #10055: Make json C89-compliant in UCS4 mode.
........
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_json.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -368,6 +368,8 @@ Tools/Demos Build ----- +- Issue #10055: Make json C89-compliant in UCS4 mode. + - Issue #1633863: Don't ignore $CC under AIX. - Issue #9810: Compile bzip2 source files in python's project file diff --git a/Modules/_json.c b/Modules/_json.c index 2ef66e3fa4..d81721a00a 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -564,8 +564,8 @@ scanstring_str(PyObject *pystr, Py_ssize_t end, char *encoding, int strict, Py_s end += 6; /* Decode 4 hex digits */ for (; next < end; next++) { - c2 <<= 4; Py_UNICODE digit = buf[next]; + c2 <<= 4; switch (digit) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': @@ -755,8 +755,8 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next end += 6; /* Decode 4 hex digits */ for (; next < end; next++) { - c2 <<= 4; Py_UNICODE digit = buf[next]; + c2 <<= 4; switch (digit) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |