summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-04-27 11:55:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-04-27 11:55:39 (GMT)
commit8f825060f1c168b913f2ac299ca48d4e9375f34d (patch)
tree8f8a2fe0d64cd2fdf98fdb762ff1def490473bde /Python/import.c
parent990eff0776a948b4a45b1c2750552c0c6864b5c7 (diff)
downloadcpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.zip
cpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.tar.gz
cpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.tar.bz2
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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 8cf10e6..103e7de 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;
}