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

Function count_defs_with_label

tests/test_extraction.c:53–60  ·  view source on GitHub ↗

Count definitions with a given label. */

Source from the content-addressed store, hash-verified

51
52/* Count definitions with a given label. */
53static int count_defs_with_label(CBMFileResult *r, const char *label) {
54 int count = 0;
55 for (int i = 0; i < r->defs.count; i++) {
56 if (strcmp(r->defs.items[i].label, label) == 0)
57 count++;
58 }
59 return count;
60}
61
62/* Convenience: extract, assert no error, return result. Caller frees. */
63static CBMFileResult *extract(const char *src, CBMLanguage lang, const char *proj,

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected