merge 3.4 (#23515)
This commit is contained in:
commit
c8fd9ce73d
|
@ -1832,7 +1832,8 @@ merge_collapse(MergeState *ms)
|
|||
assert(ms);
|
||||
while (ms->n > 1) {
|
||||
Py_ssize_t n = ms->n - 2;
|
||||
if (n > 0 && p[n-1].len <= p[n].len + p[n+1].len) {
|
||||
if ((n > 0 && p[n-1].len <= p[n].len + p[n+1].len) ||
|
||||
(n > 1 && p[n-2].len <= p[n-1].len + p[n].len)) {
|
||||
if (p[n-1].len < p[n+1].len)
|
||||
--n;
|
||||
if (merge_at(ms, n) < 0)
|
||||
|
|
Loading…
Reference in New Issue