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

Function find_def_by_name

tests/test_extraction.c:2692–2699  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2690
2691/* Find a definition by name; returns the item or NULL. */
2692static const CBMDefinition *find_def_by_name(CBMFileResult *r, const char *name) {
2693 for (int i = 0; i < r->defs.count; i++) {
2694 if (r->defs.items[i].name && strcmp(r->defs.items[i].name, name) == 0) {
2695 return &r->defs.items[i];
2696 }
2697 }
2698 return NULL;
2699}
2700
2701static int decorators_contain(const CBMDefinition *d, const char *needle) {
2702 if (!d || !d->decorators) {

Callers 1

test_extraction.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected