summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_json.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index ae4c06b..a76b995 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -600,6 +600,8 @@ Extension Modules
Build
-----
+- Issue #10055: Make json C89-compliant in UCS4 mode.
+
- Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6.
- Issue #1633863: Don't ignore $CC under AIX.
diff --git a/Modules/_json.c b/Modules/_json.c
index 2e39525..4da5e74 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -430,8 +430,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':