Kaydet (Commit) 42dfd713 authored tarafından Victor Stinner's avatar Victor Stinner

unicode_kind_name() doesn't check consistency anymore

It is is called from _PyUnicode_Dump() and so must not fail.
üst a3b334da
...@@ -627,7 +627,8 @@ _PyUnicode_New(Py_ssize_t length) ...@@ -627,7 +627,8 @@ _PyUnicode_New(Py_ssize_t length)
static const char* static const char*
unicode_kind_name(PyObject *unicode) 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_COMPACT(unicode))
{ {
if (!PyUnicode_IS_READY(unicode)) if (!PyUnicode_IS_READY(unicode))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment