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

Function c1_label_of

tests/test_pipeline.c:14269–14280  ·  view source on GitHub ↗

Label of the node ` . `, copied into `out`; "" when there is none. */

Source from the content-addressed store, hash-verified

14267
14268/* Label of the node `<project>.<qn_tail>`, copied into `out`; "" when there is none. */
14269static const char *c1_label_of(cbm_store_t *s, const char *project, const char *qn_tail, char *out,
14270 size_t out_size) {
14271 char qn[512];
14272 snprintf(qn, sizeof(qn), "%s.%s", project, qn_tail);
14273 cbm_node_t node = {0};
14274 out[0] = '\0';
14275 if (cbm_store_find_node_by_qn(s, project, qn, &node) == CBM_STORE_OK && node.label) {
14276 snprintf(out, out_size, "%s", node.label);
14277 }
14278 cbm_node_free_fields(&node);
14279 return out;
14280}
14281
14282/* Do the properties of the node `<project>.<qn_tail>` contain `needle`? */
14283static bool c1_props_contain(cbm_store_t *s, const char *project, const char *qn_tail,

Callers 1

test_pipeline.cFile · 0.85

Calls 2

cbm_node_free_fieldsFunction · 0.85

Tested by

no test coverage detected