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

Function op_spans_push

src/pipeline/pass_operator.c:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91} op_spans_t;
92
93static void op_spans_push(op_spans_t *v, op_span_t span) {
94 if (v->count == v->cap) {
95 int cap = v->cap ? v->cap * PAIR_LEN : OP_GROW_MIN;
96 op_span_t *grown = cbm_realloc(CBM_MEM_CLASS_OTHER, v->items, (size_t)cap * sizeof(*grown));
97 if (!grown) {
98 return;
99 }
100 v->items = grown;
101 v->cap = cap;
102 }
103 v->items[v->count++] = span;
104}
105
106static void op_free_spans(const char *key, void *value, void *ud) {
107 (void)ud;

Callers 1

op_index_spanFunction · 0.85

Calls 1

cbm_reallocFunction · 0.85

Tested by

no test coverage detected