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

Function bases_contain_substr

tests/test_extraction_inheritance.c:97–105  ·  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

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

Callers 1

run_inherit_caseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected