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/compile.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/compile.c')
-rw-r--r-- | Python/compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 79d1d21670..10e9ad27f5 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -263,6 +263,7 @@ _Py_Mangle(PyObject *privateobj, PyObject *ident) Py_DECREF(result); return NULL; } + assert(_PyUnicode_CheckConsistency(result, 1)); return result; } |