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

Function find_def_by_name

tests/test_extraction.c:4753–4760  ·  view source on GitHub ↗

Find a definition by name; returns the item or NULL. */

Source from the content-addressed store, hash-verified

4751
4752/* Find a definition by name; returns the item or NULL. */
4753static const CBMDefinition *find_def_by_name(CBMFileResult *r, const char *name) {
4754 for (int i = 0; i < r->defs.count; i++) {
4755 if (r->defs.items[i].name && strcmp(r->defs.items[i].name, name) == 0) {
4756 return &r->defs.items[i];
4757 }
4758 }
4759 return NULL;
4760}
4761
4762static int decorators_contain(const CBMDefinition *d, const char *needle) {
4763 if (!d || !d->decorators) {

Callers 1

test_extraction.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected