Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make json.loads faster for long strings. (Patch by Marco Paolini)
2 changes: 1 addition & 1 deletion Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next
if (c == '"' || c == '\\') {
break;
}
else if (strict && c <= 0x1f) {
else if (c <= 0x1f && strict) {
raise_errmsg("Invalid control character at", pystr, next);
goto bail;
}
Expand Down