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

Function op_nodes_push

src/pipeline/pass_operator.c:271–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269} op_nodes_t;
270
271static void op_nodes_push(op_nodes_t *v, const cbm_gbuf_node_t *n) {
272 if (v->count == v->cap) {
273 int cap = v->cap ? v->cap * PAIR_LEN : OP_GROW_MIN;
274 const cbm_gbuf_node_t **grown =
275 cbm_realloc(CBM_MEM_CLASS_OTHER, (void *)v->items, (size_t)cap * sizeof(*grown));
276 if (!grown) {
277 return;
278 }
279 v->items = grown;
280 v->cap = cap;
281 }
282 v->items[v->count++] = n;
283}
284
285static void op_free_nodes_entry(const char *key, void *value, void *ud) {
286 (void)ud;

Callers 1

op_types_by_dirFunction · 0.85

Calls 1

cbm_reallocFunction · 0.85

Tested by

no test coverage detected