Add consistency check to _PyUnicode_New()

This commit is contained in:
Victor Stinner 2011-10-18 22:10:14 +02:00
parent 9e92188f53
commit 6707293e75

View file

@ -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: