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

Function cr_array

internal/cbm/result_compact.c:194–208  ·  view source on GitHub ↗

A record array: copied at exact count, then the caller walks its fields. */

Source from the content-addressed store, hash-verified

192
193/* A record array: copied at exact count, then the caller walks its fields. */
194static void cr_array(cr_ctx_t *c, void **items, int count, size_t elem) {
195 if (!*items || count <= 0) {
196 if (c->phase == CR_COPY) {
197 *items = NULL;
198 }
199 return;
200 }
201 if (c->phase == CR_RELOCATE) {
202 if (cr_in_old_block(c, *items)) {
203 *items = (char *)*items + c->delta;
204 }
205 return;
206 }
207 cr_blob(c, (const void **)items, (size_t)count * elem);
208}
209
210/* A NULL-terminated list of strings: the pointer array plus each string. */
211static void cr_list(cr_ctx_t *c, const char ***field) {

Callers 3

cr_walk_callFunction · 0.85
cr_walk_py_namespaceFunction · 0.85
cr_walkFunction · 0.85

Calls 2

cr_in_old_blockFunction · 0.85
cr_blobFunction · 0.85

Tested by

no test coverage detected