commit | 3a7f7977f1ad3e5afe79254eef5057c0288613db | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@gmail.com> | Thu May 03 03:36:40 2012 +0200 |
committer | Victor Stinner <victor.stinner@gmail.com> | Thu May 03 03:36:40 2012 +0200 |
tree | 5aa7c8262e8d2a203f17551f0129a385291d03ad | |
parent | 684d5fd42067109f46e94ea3ddab72ebd4e130ee [diff] [blame] |
Remove buggy assertion in PyUnicode_Substring() Use also directly unicode_empty, instead of PyUnicode_New(0,0).
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 09b5733..0e7493b 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -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;