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

Function find_def

tests/test_extraction_inheritance.c:64–71  ·  view source on GitHub ↗

Find a definition by label+name; returns NULL if not found. */

Source from the content-addressed store, hash-verified

62
63/* Find a definition by label+name; returns NULL if not found. */
64static CBMDefinition *find_def(CBMFileResult *r, const char *label, const char *name) {
65 for (int i = 0; i < r->defs.count; i++) {
66 CBMDefinition *d = &r->defs.items[i];
67 if (d->label && strcmp(d->label, label) == 0 && d->name && strcmp(d->name, name) == 0)
68 return d;
69 }
70 return NULL;
71}
72
73/* Find a definition by name alone (any label). */
74static CBMDefinition *find_def_any(CBMFileResult *r, const char *name) {

Callers 1

find_def_flexFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected