From: Victor Stinner Date: Mon, 3 Oct 2011 12:41:45 +0000 (+0200) Subject: unicode_kind_name() doesn't check consistency anymore X-Git-Tag: v3.3.0a1~1367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42dfd713331d1f36b26abb8c4d215340e59a76bf;p=thirdparty%2FPython%2Fcpython.git unicode_kind_name() doesn't check consistency anymore It is is called from _PyUnicode_Dump() and so must not fail. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cc6b41697d5c..30db41883205 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -627,7 +627,8 @@ _PyUnicode_New(Py_ssize_t length) static const char* unicode_kind_name(PyObject *unicode) { - assert(_PyUnicode_CHECK(unicode)); + /* don't check consistency: unicode_kind_name() is called from + _PyUnicode_Dump() */ if (!PyUnicode_IS_COMPACT(unicode)) { if (!PyUnicode_IS_READY(unicode))