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 /Python/import.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 'Python/import.c')
| -rw-r--r-- | Python/import.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 8cf10e658c..103e7de439 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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; } |
