summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@wyplay.com>2011-10-03 12:41:45 (GMT)
committerVictor Stinner <vstinner@wyplay.com>2011-10-03 12:41:45 (GMT)
commit42dfd713331d1f36b26abb8c4d215340e59a76bf (patch)
treea3bdec0ae06a35454bbf7df58e09e026aff4a85f /Objects
parenta3b334da6dd0477e5bf144934d184bc0b3e3779b (diff)
downloadcpython-42dfd713331d1f36b26abb8c4d215340e59a76bf.zip
cpython-42dfd713331d1f36b26abb8c4d215340e59a76bf.tar.gz
cpython-42dfd713331d1f36b26abb8c4d215340e59a76bf.tar.bz2
unicode_kind_name() doesn't check consistency anymore
It is is called from _PyUnicode_Dump() and so must not fail.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index cc6b416..30db418 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))