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

Function c1_def_at

tests/test_extraction.c:8211–8221  ·  view source on GitHub ↗

The def with this label and name that starts on `line`. */

Source from the content-addressed store, hash-verified

8209
8210/* The def with this label and name that starts on `line`. */
8211static const CBMDefinition *c1_def_at(CBMFileResult *r, const char *label, const char *name,
8212 int line) {
8213 for (int i = 0; i < r->defs.count; i++) {
8214 const CBMDefinition *d = &r->defs.items[i];
8215 if (d->label && d->name && strcmp(d->label, label) == 0 && strcmp(d->name, name) == 0 &&
8216 (int)d->start_line == line) {
8217 return d;
8218 }
8219 }
8220 return NULL;
8221}
8222
8223/* A preprocessor macro's QN is `<module>.<NAME>#macro` (CBM_MACRO_QN_SUFFIX); name and
8224 * label stay. C keeps macros apart from ordinary identifiers, so a macro and the

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected