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

Function bases_contain_substr

tests/test_extraction_inheritance.c:93–101  ·  view source on GitHub ↗

Return 1 if ANY base_classes entry contains `substr` as a substring. * Used to assert that keywords like "extends" / "implements" / ":" do NOT * appear inside any captured base name. */

Source from the content-addressed store, hash-verified

91 * Used to assert that keywords like "extends" / "implements" / ":" do NOT
92 * appear inside any captured base name. */
93static int bases_contain_substr(CBMDefinition *d, const char *substr) {
94 if (!d->base_classes)
95 return 0;
96 for (const char **b = d->base_classes; *b; b++) {
97 if (strstr(*b, substr))
98 return 1;
99 }
100 return 0;
101}
102
103/* Count entries in a NULL-terminated base_classes array. */
104static int bases_count(CBMDefinition *d) {

Callers 1

run_inherit_caseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected