mirror of
https://github.com/python/cpython.git
synced 2025-09-21 16:10:33 +00:00
merge 3.5 (#27093)
This commit is contained in:
commit
c35f491a06
1 changed files with 15 additions and 11 deletions
|
@ -328,21 +328,25 @@ find_pairencmap(ucs2_t body, ucs2_t modifier,
|
||||||
min = 0;
|
min = 0;
|
||||||
max = haystacksize;
|
max = haystacksize;
|
||||||
|
|
||||||
for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1)
|
for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) {
|
||||||
if (value < haystack[pos].uniseq) {
|
if (value < haystack[pos].uniseq) {
|
||||||
if (max == pos) break;
|
if (max != pos) {
|
||||||
else max = pos;
|
max = pos;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (value > haystack[pos].uniseq) {
|
else if (value > haystack[pos].uniseq) {
|
||||||
if (min == pos) break;
|
if (min != pos) {
|
||||||
else min = pos;
|
min = pos;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (value == haystack[pos].uniseq)
|
if (value == haystack[pos].uniseq) {
|
||||||
return haystack[pos].code;
|
return haystack[pos].code;
|
||||||
else
|
}
|
||||||
return DBCINV;
|
return DBCINV;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue