From 42dfd713331d1f36b26abb8c4d215340e59a76bf Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 3 Oct 2011 14:41:45 +0200 Subject: [PATCH] unicode_kind_name() doesn't check consistency anymore It is is called from _PyUnicode_Dump() and so must not fail. --- Objects/unicodeobject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cc6b41697d..30db418832 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)) -- 2.49.0