[return, *hi): the extras of this shared declaration, name and arity * (CS_NONE: the name's members). */
| 2567 | /* [return, *hi): the extras of this shared declaration, name and arity |
| 2568 | * (CS_NONE: the name's members). */ |
| 2569 | static int extra_range(const cs_index_t *ix, int twin, const char *name, int arity, int *hi) { |
| 2570 | int lo = 0; |
| 2571 | int end = ix->nextras; |
| 2572 | while (lo < end) { |
| 2573 | int mid = lo + ((end - lo) / PAIR_LEN); |
| 2574 | if (extra_key_cmp(&ix->extras[mid], twin, name, arity) < 0) { |
| 2575 | lo = mid + SKIP_ONE; |
| 2576 | } else { |
| 2577 | end = mid; |
| 2578 | } |
| 2579 | } |
| 2580 | int a = lo; |
| 2581 | end = ix->nextras; |
| 2582 | while (a < end) { |
| 2583 | int mid = a + ((end - a) / PAIR_LEN); |
| 2584 | if (extra_key_cmp(&ix->extras[mid], twin, name, arity) <= 0) { |
| 2585 | a = mid + SKIP_ONE; |
| 2586 | } else { |
| 2587 | end = mid; |
| 2588 | } |
| 2589 | } |
| 2590 | *hi = a; |
| 2591 | return lo; |
| 2592 | } |
| 2593 | |
| 2594 | /* ── Import candidate indexes ───────────────────────────────────── */ |
| 2595 |
no test coverage detected