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

Function has_def_qn

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

Count definitions with a given label. */ Check for a definition with the given qualified name. Distinct from * find_def_by_name, which returns the first match by NAME and so cannot tell two * same-named definitions in different scopes apart — exactly the case that * attrpath qualification exists to separate. */

Source from the content-addressed store, hash-verified

58 * same-named definitions in different scopes apart — exactly the case that
59 * attrpath qualification exists to separate. */
60static int has_def_qn(CBMFileResult *r, const char *qn) {
61 for (int i = 0; i < r->defs.count; i++) {
62 if (r->defs.items[i].qualified_name && strcmp(r->defs.items[i].qualified_name, qn) == 0)
63 return 1;
64 }
65 return 0;
66}
67
68static int count_defs_with_label(CBMFileResult *r, const char *label) {
69 int count = 0;

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected