commit | 6707293e750436fedd3a5fac1ca7057b14112d5b | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 18 22:10:14 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 18 22:10:14 2011 +0200 |
tree | 1d5d75be10005940d367879abad17feee77f4f07 | |
parent | 9e92188f53b89bef01824c061650908baddb8e16 [diff] |
Add consistency check to _PyUnicode_New()
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9d11546..1068916 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -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: