Build per-file import map from cached extraction result or graph buffer edges. */
| 167 | |
| 168 | /* Build per-file import map from cached extraction result or graph buffer edges. */ |
| 169 | static int build_import_map(cbm_pipeline_ctx_t *ctx, const char *rel_path, |
| 170 | const CBMFileResult *result, const char ***out_keys, |
| 171 | const char ***out_vals, int *out_count) { |
| 172 | *out_keys = NULL; |
| 173 | *out_vals = NULL; |
| 174 | *out_count = 0; |
| 175 | |
| 176 | if (result && result->imports.count > 0) { |
| 177 | return build_import_map_from_cache(ctx, result, out_keys, out_vals, out_count); |
| 178 | } |
| 179 | return build_import_map_from_edges(ctx, rel_path, out_keys, out_vals, out_count); |
| 180 | } |
| 181 | |
| 182 | static void free_import_map(const char **keys, const char **vals, int count) { |
| 183 | if (keys) { |
no test coverage detected