diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-04-27 13:55:39 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-04-27 13:55:39 +0200 |
commit | 2555301e0aafefea124fe79f268207bc752a4722 (patch) | |
tree | 1cb1f2fa6b5cc325c50217c3d77c28c8fbcf62ec /Modules/_json.c | |
parent | ef1380cc8725ace887ac0fd6ed53cf05230f674b (diff) | |
download | cpython-2555301e0aafefea124fe79f268207bc752a4722.tar.gz |
Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)
* In debug mode, fill the string data with invalid characters
* Simplify also reference counting in PyCodec_BackslashReplaceErrors()
and PyCodec_XMLCharRefReplaceError()
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 95c658ca7c..40c2ced502 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -246,6 +246,7 @@ ascii_escape_unicode(PyObject *pystr) } } output[chars++] = '"'; + assert(_PyUnicode_CheckConsistency(rval, 1)); return rval; } |