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

Function cs_item_start_cmp

internal/cbm/doclink_cs.c:2390–2398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2388}
2389
2390static int cs_item_start_cmp(const void *a, const void *b) {
2391 const cs_item_t *x = (const cs_item_t *)a;
2392 const cs_item_t *y = (const cs_item_t *)b;
2393 if (x->start != y->start) {
2394 return x->start < y->start ? -1 : 1;
2395 }
2396 /* declarators of one field declaration keep their order */
2397 return (x->tree_idx > y->tree_idx) - (x->tree_idx < y->tree_idx);
2398}
2399
2400/* Read the declaration a keyword starts from the text and add it as an item,
2401 * unless the tree already has a node for it (`parsed`: the name positions of

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected