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

Function push_tree_entry

src/store/store.c:9801–9808  ·  view source on GitHub ↗

Push a tree entry, growing the array if needed. */

Source from the content-addressed store, hash-verified

9799
9800/* Push a tree entry, growing the array if needed. */
9801static void push_tree_entry(cbm_file_tree_entry_t **entries, int *en, int *ecap,
9802 cbm_file_tree_entry_t e) {
9803 if (*en >= *ecap) {
9804 *ecap *= ST_GROWTH;
9805 *entries = safe_realloc(*entries, *ecap * sizeof(cbm_file_tree_entry_t));
9806 }
9807 (*entries)[(*en)++] = e;
9808}
9809
9810/* Collect tree entries from dir arrays. */
9811static void arch_collect_entries(char **dir_paths, int *dir_child_counts, char ***dir_children,

Callers 1

arch_collect_entriesFunction · 0.85

Calls 1

safe_reallocFunction · 0.85

Tested by

no test coverage detected