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

Function deferred_buf_push

src/pipeline/pass_semantic_edges.c:92–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static void deferred_buf_push(deferred_edge_buf_t *buf, int64_t src, int64_t tgt, float score,
93 bool same_file, int i, int j, int c) {
94 if (buf->count >= buf->cap) {
95 int nc = buf->cap < CBM_SZ_256 ? CBM_SZ_256 : buf->cap * GROW;
96 deferred_edge_t *grown = realloc(buf->edges, (size_t)nc * sizeof(deferred_edge_t));
97 if (!grown) {
98 return;
99 }
100 buf->edges = grown;
101 buf->cap = nc;
102 }
103 buf->edges[buf->count++] = (deferred_edge_t){.source_id = src,
104 .target_id = tgt,
105 .score = score,
106 .same_file = same_file,
107 .i = i,
108 .j = j,
109 .c = c};
110}
111
112static void deferred_buf_free(deferred_edge_buf_t *buf) {
113 free(buf->edges);

Callers 1

score_try_emitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected