diff Objects/unicodeobject.c @ 76724:69ed936deb0f

Remove buggy assertion in PyUnicode_Substring() Use also directly unicode_empty, instead of PyUnicode_New(0,0).
author Victor Stinner <victor.stinner@gmail.com>
date Thu, 03 May 2012 03:36:40 +0200
parents 99be985edeca
children 830eeff4fe8f
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Thu May 03 02:32:34 2012 +0200
+++ b/Objects/unicodeobject.c	Thu May 03 03:36:40 2012 +0200
@@ -12078,8 +12078,8 @@
         return NULL;
     }
     if (start >= length || end < start) {
-        assert(end == length);
-        return PyUnicode_New(0, 0);
+        Py_INCREF(unicode_empty);
+        return unicode_empty;
     }
 
     length = end - start;