diff Python/compile.c @ 76573:1439e2d1f490

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()
author Victor Stinner <victor.stinner@gmail.com>
date Fri, 27 Apr 2012 13:55:39 +0200
parents 22844ddce57b
children 96ab78ef82a7
line wrap: on
line diff
--- a/Python/compile.c	Thu Apr 26 17:05:31 2012 +0200
+++ b/Python/compile.c	Fri Apr 27 13:55:39 2012 +0200
@@ -263,6 +263,7 @@
         Py_DECREF(result);
         return NULL;
     }
+    assert(_PyUnicode_CheckConsistency(result, 1));
     return result;
 }