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

Function has_def

tests/test_extraction.c:33–39  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

31
32/* Check if any definition with the given label has the given name. */
33static int has_def(CBMFileResult *r, const char *label, const char *name) {
34 for (int i = 0; i < r->defs.count; i++) {
35 if (strcmp(r->defs.items[i].label, label) == 0 && strcmp(r->defs.items[i].name, name) == 0)
36 return 1;
37 }
38 return 0;
39}
40
41/* Check if any definition has the given name (any label). */
42static int has_def_any(CBMFileResult *r, const char *name) {

Callers 2

test_extraction.cFile · 0.70
deep_error_regions_probeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected