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. */
| 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. */ |
| 1223 | static 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. */ |
no test coverage detected