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

Function ej_strings

src/pipeline/pass_envjoin.c:151–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149} ej_set_t;
150
151static const char **ej_strings(CBMArena *a, yyjson_val *arr, int *n) {
152 *n = 0;
153 size_t cnt = yyjson_is_arr(arr) ? yyjson_arr_size(arr) : 0;
154 const char **out = cnt ? cbm_arena_alloc(a, cnt * sizeof(*out)) : NULL;
155 yyjson_arr_iter it;
156 yyjson_val *v;
157 for (yyjson_arr_iter_init(arr, &it); out && (v = yyjson_arr_iter_next(&it));) {
158 const char *s = yyjson_get_str(v);
159 if (s) {
160 out[(*n)++] = cbm_arena_strdup(a, s);
161 }
162 }
163 return out;
164}
165
166/* A Dockerfile Module's image set, parsed from its properties; NULL: none. */
167static ej_set_t *ej_set_parse(CBMArena *a, const char *path, const char *props) {

Callers 1

ej_set_parseFunction · 0.85

Calls 2

cbm_arena_allocFunction · 0.50
cbm_arena_strdupFunction · 0.50

Tested by

no test coverage detected