Remove buggy assertion in PyUnicode_Substring()
Use also directly unicode_empty, instead of PyUnicode_New(0,0).
This commit is contained in:
parent
684d5fd420
commit
3a7f7977f1
|
@ -12078,8 +12078,8 @@ PyUnicode_Substring(PyObject *self, Py_ssize_t start, Py_ssize_t end)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue