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

Function count_label

tests/test_lang_contract.c:185–193  ·  view source on GitHub ↗

Count nodes carrying `label`. Returns -1 on query error. */

Source from the content-addressed store, hash-verified

183
184/* Count nodes carrying `label`. Returns -1 on query error. */
185static int count_label(cbm_store_t *store, const char *project, const char *label) {
186 cbm_node_t *nodes = NULL;
187 int count = 0;
188 if (cbm_store_find_nodes_by_label(store, project, label, &nodes, &count) != CBM_STORE_OK) {
189 return -1;
190 }
191 cbm_store_free_nodes(nodes, count);
192 return count;
193}
194
195/* Count "type-like" nodes across the labels different languages use for a
196 * user-defined type (class/struct/interface/enum/trait/type alias). Lets a

Callers 1

type_like_nodesFunction · 0.85

Calls 2

cbm_store_free_nodesFunction · 0.85

Tested by

no test coverage detected