[Python-checkins] cpython: unicode_kind_name() doesn't check consistency anymore
victor.stinner
python-checkins at python.org
Mon Oct 3 14:51:25 CEST 2011
http://hg.python.org/cpython/rev/9fe93afc57b5
changeset: 72615:9fe93afc57b5
user: Victor Stinner <vstinner at wyplay.com>
date: Mon Oct 03 14:41:45 2011 +0200
summary:
unicode_kind_name() doesn't check consistency anymore
It is is called from _PyUnicode_Dump() and so must not fail.
files:
Objects/unicodeobject.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -627,7 +627,8 @@
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))
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list