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

Function pkg_entries_push

src/pipeline/pass_pkgmap.c:104–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static void pkg_entries_push(cbm_pkg_entries_t *e, char *pkg_name, char *entry_rel) {
105 if (e->count >= e->cap) {
106 int new_cap = e->cap == 0 ? PKGMAP_INIT_CAP : e->cap * SKIP_ONE * PAIR_LEN;
107 cbm_pkg_entry_t *tmp = realloc(e->items, new_cap * sizeof(cbm_pkg_entry_t));
108 if (!tmp) {
109 free(pkg_name);
110 free(entry_rel);
111 return;
112 }
113 e->items = tmp;
114 e->cap = new_cap;
115 }
116 e->items[e->count].pkg_name = pkg_name;
117 e->items[e->count].entry_rel = entry_rel;
118 e->count++;
119}
120
121void cbm_pkg_entries_free(cbm_pkg_entries_t *e) {
122 for (int i = 0; i < e->count; i++) {

Callers 12

parse_package_jsonFunction · 0.85
parse_go_modFunction · 0.85
parse_cargo_tomlFunction · 0.85
parse_pyproject_tomlFunction · 0.85
extract_psr4Function · 0.85
parse_composer_jsonFunction · 0.85
parse_pubspec_yamlFunction · 0.85
parse_pom_xmlFunction · 0.85
parse_build_gradleFunction · 0.85
parse_mix_exsFunction · 0.85
parse_gemspecFunction · 0.85
swift_register_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected