From: Victor Stinner Date: Tue, 18 Oct 2011 20:10:14 +0000 (+0200) Subject: Add consistency check to _PyUnicode_New() X-Git-Tag: v3.3.0a1~1139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6707293e750436fedd3a5fac1ca7057b14112d5b;p=thirdparty%2FPython%2Fcpython.git Add consistency check to _PyUnicode_New() --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9d11546cb339..1068916884e5 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -781,6 +781,7 @@ _PyUnicode_New(Py_ssize_t length) _PyUnicode_LENGTH(unicode) = 0; _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; + assert(_PyUnicode_CheckConsistency(unicode, 0)); return unicode; onError: