]> granicus.if.org Git - python/commitdiff
Issue #10055: Make json C89-compliant in UCS4 mode.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 9 Oct 2010 15:24:28 +0000 (15:24 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 9 Oct 2010 15:24:28 +0000 (15:24 +0000)
Misc/NEWS
Modules/_json.c

index ac731c56b0547d09c9eb17df5c40d8032b90fe64..94f0d8680ff63e9bc525385e750a1776c0d13630 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -346,6 +346,8 @@ Tests
 Build
 -----
 
+- Issue #10055: Make json C89-compliant in UCS4 mode.
+
 - Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows)
 
 - Issue #1633863: Don't ignore $CC under AIX.
index bbaf7dd4a7190676cad1b2f2b0b537d1a08ef076..dd9749bc682b61249f0b1b2a0cc64beb4b462c86 100644 (file)
@@ -440,8 +440,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':