summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-04-27 13:55:39 +0200
committerVictor Stinner <victor.stinner@gmail.com>2012-04-27 13:55:39 +0200
commit2555301e0aafefea124fe79f268207bc752a4722 (patch)
tree1cb1f2fa6b5cc325c50217c3d77c28c8fbcf62ec /Python/compile.c
parentef1380cc8725ace887ac0fd6ed53cf05230f674b (diff)
downloadcpython-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.c1
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;
}