MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / extra_range

Function extra_range

src/pipeline/doc_links_cs.c:2569–2592  ·  view source on GitHub ↗

[return, *hi): the extras of this shared declaration, name and arity * (CS_NONE: the name's members). */

Source from the content-addressed store, hash-verified

2567/* [return, *hi): the extras of this shared declaration, name and arity
2568 * (CS_NONE: the name's members). */
2569static 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

Callers 1

unseen_part_declaresFunction · 0.85

Calls 1

extra_key_cmpFunction · 0.85

Tested by

no test coverage detected