mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -992,6 +992,7 @@ make_source_pathname(PyObject *path)
|
|||
(j = dot0-right));
|
||||
PyUnicode_WRITE(kind, data, i+j, 'p');
|
||||
PyUnicode_WRITE(kind, data, i+j+1, 'y');
|
||||
assert(_PyUnicode_CheckConsistency(result, 1));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue