Check if any import with the given module path exists. */
| 41 | |
| 42 | /* Check if any import with the given module path exists. */ |
| 43 | static int __attribute__((unused)) has_import(CBMFileResult *r, const char *path_substr) { |
| 44 | for (int i = 0; i < r->imports.count; i++) { |
| 45 | if (r->imports.items[i].module_path && |
| 46 | strstr(r->imports.items[i].module_path, path_substr) != NULL) |
| 47 | return 1; |
| 48 | } |
| 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | /* Count definitions with a given label. */ |
| 53 | static int count_defs_with_label(CBMFileResult *r, const char *label) { |