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

Function has_def_qn

tests/test_extraction.c:74–80  ·  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

72 * same-named definitions in different scopes apart — exactly the case that
73 * attrpath qualification exists to separate. */
74static int has_def_qn(CBMFileResult *r, const char *qn) {
75 for (int i = 0; i < r->defs.count; i++) {
76 if (r->defs.items[i].qualified_name && strcmp(r->defs.items[i].qualified_name, qn) == 0)
77 return 1;
78 }
79 return 0;
80}
81
82static int count_defs_with_label(CBMFileResult *r, const char *label) {
83 int count = 0;

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected