diff Objects/unicodeobject.c @ 72979:e2d82169458e

Add consistency check to _PyUnicode_New()
author Victor Stinner <victor.stinner@haypocalc.com>
date Tue, 18 Oct 2011 22:10:14 +0200
parents af0800b986b7
children a985d733b3a3
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Tue Oct 18 21:55:25 2011 +0200
+++ b/Objects/unicodeobject.c	Tue Oct 18 22:10:14 2011 +0200
@@ -781,6 +781,7 @@
     _PyUnicode_LENGTH(unicode) = 0;
     _PyUnicode_UTF8(unicode) = NULL;
     _PyUnicode_UTF8_LENGTH(unicode) = 0;
+    assert(_PyUnicode_CheckConsistency(unicode, 0));
     return unicode;
 
   onError: