mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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()
This commit is contained in:
parent
990eff0776
commit
8f825060f1
10 changed files with 31 additions and 14 deletions
|
@ -626,6 +626,7 @@ PyBytes_Repr(PyObject *obj, int smartquotes)
|
|||
*p++ = c;
|
||||
}
|
||||
*p++ = quote;
|
||||
assert(_PyUnicode_CheckConsistency(v, 1));
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue