Check if any import with the given module path exists. */
| 58 | |
| 59 | /* Check if any import with the given module path exists. */ |
| 60 | static int __attribute__((unused)) has_import(CBMFileResult *r, const char *path_substr) { |
| 61 | for (int i = 0; i < r->imports.count; i++) { |
| 62 | if (r->imports.items[i].module_path && |
| 63 | strstr(r->imports.items[i].module_path, path_substr) != NULL) |
| 64 | return 1; |
| 65 | } |
| 66 | return 0; |
| 67 | } |
| 68 | |
| 69 | /* Count definitions with a given label. */ |
| 70 | /* Check for a definition with the given qualified name. Distinct from |