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

Function has_def

tests/test_extraction.c:16–22  ·  view source on GitHub ↗

Check if any definition with the given label has the given name. */

Source from the content-addressed store, hash-verified

14
15/* Check if any definition with the given label has the given name. */
16static int has_def(CBMFileResult *r, const char *label, const char *name) {
17 for (int i = 0; i < r->defs.count; i++) {
18 if (strcmp(r->defs.items[i].label, label) == 0 && strcmp(r->defs.items[i].name, name) == 0)
19 return 1;
20 }
21 return 0;
22}
23
24/* Check if any definition has the given name (any label). */
25static int has_def_any(CBMFileResult *r, const char *name) {

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected