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

Function dm_msb_eval

tests/test_doc_mentions.c:1223–1238  ·  view source on GitHub ↗

Evaluate `project` over `files`, each through the extractor's scope blob: * no file is written, none is read. The result is released with * cbm_msb_result_free. false when a file yields no blob or memory runs out. */

Source from the content-addressed store, hash-verified

1221 * no file is written, none is read. The result is released with
1222 * cbm_msb_result_free. false when a file yields no blob or memory runs out. */
1223static bool dm_msb_eval(const dm_project_file_t *files, int n, const char *project,
1224 cbm_msb_result_t *out) {
1225 cbm_msb_t *m = cbm_msb_new();
1226 bool ok = m != NULL;
1227 for (int i = 0; ok && i < n; i++) {
1228 CBMFileResult *r = dm_extract(files[i].xml, CBM_LANG_XML, files[i].rel_path);
1229 ok = r && r->doc_scope && cbm_msb_is_project_scope(r->doc_scope) &&
1230 cbm_msb_add(m, files[i].rel_path, r->doc_scope);
1231 if (r) {
1232 cbm_free_result(r);
1233 }
1234 }
1235 ok = ok && cbm_msb_eval(m, project, out);
1236 cbm_msb_free(m);
1237 return ok;
1238}
1239
1240/* True when the result holds a using of this kind (n namespace, s static,
1241 * a alias) and target. */

Callers 2

dm_cond_usingFunction · 0.85

Calls 7

cbm_msb_newFunction · 0.85
dm_extractFunction · 0.85
cbm_msb_is_project_scopeFunction · 0.85
cbm_msb_addFunction · 0.85
cbm_free_resultFunction · 0.85
cbm_msb_evalFunction · 0.85
cbm_msb_freeFunction · 0.85

Tested by

no test coverage detected