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

Function find_def

tests/repro/repro_extraction.c:21–31  ·  view source on GitHub ↗

Find the first definition matching label+name (either may be NULL = wildcard). */

Source from the content-addressed store, hash-verified

19
20/* Find the first definition matching label+name (either may be NULL = wildcard). */
21static CBMDefinition *find_def(CBMFileResult *r, const char *label, const char *name) {
22 for (int i = 0; i < r->defs.count; i++) {
23 CBMDefinition *d = &r->defs.items[i];
24 if (label && (!d->label || strcmp(d->label, label) != 0))
25 continue;
26 if (name && (!d->name || strcmp(d->name, name) != 0))
27 continue;
28 return d;
29 }
30 return NULL;
31}
32
33/* ───────────────────────────────────────────────────────────────────
34 * #554 — C++ out-of-line method definitions: the CALLS edge source falls

Callers 1

repro_extraction.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected