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

Function find_def

tests/test_extraction.c:2858–2864  ·  view source on GitHub ↗

Return the first definition with the given name, or NULL. */

Source from the content-addressed store, hash-verified

2856
2857/* Return the first definition with the given name, or NULL. */
2858static const CBMDefinition *find_def(CBMFileResult *r, const char *name) {
2859 for (int i = 0; i < r->defs.count; i++) {
2860 if (strcmp(r->defs.items[i].name, name) == 0)
2861 return &r->defs.items[i];
2862 }
2863 return NULL;
2864}
2865
2866TEST(complexity_nested_loops_depth) {
2867 CBMFileResult *r = extract("package p\n"

Callers 1

test_extraction.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected