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

Function rs_defkey_cmp

internal/cbm/doclink_rs.c:2276–2284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2274/* ── Scope scan: definitions ─────────────────────────────────────── */
2275
2276static int rs_defkey_cmp(const void *a, const void *b) {
2277 const rs_defkey_t *x = (const rs_defkey_t *)a;
2278 const rs_defkey_t *y = (const rs_defkey_t *)b;
2279 if (x->line != y->line) {
2280 return x->line < y->line ? -1 : 1;
2281 }
2282 int c = strcmp(x->name, y->name);
2283 return c ? c : (x->def > y->def) - (x->def < y->def);
2284}
2285
2286/* The order in which the graph buffer lets definitions of one qualified name
2287 * replace each other (cbm_gbuf_upsert_node, same file): start line, then

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected