| 298 | } |
| 299 | |
| 300 | static void pr_destroy(void *index) { |
| 301 | pr_index_t *ix = (pr_index_t *)index; |
| 302 | if (!ix) { |
| 303 | return; |
| 304 | } |
| 305 | cbm_ht_free(ix->type_at); |
| 306 | cbm_ht_free(ix->func_at); |
| 307 | cbm_ht_free(ix->roots); |
| 308 | cbm_ht_free(ix->by_path); |
| 309 | cbm_free(CBM_MEM_CLASS_OTHER, ix->run_to_file); |
| 310 | cbm_arena_destroy(&ix->arena); |
| 311 | cbm_free(CBM_MEM_CLASS_OTHER, ix); |
| 312 | } |
| 313 | |
| 314 | /* The namespace root of a qualified name ("" for a global one). */ |
| 315 | static void pr_add_root(pr_index_t *ix, const char *name) { |
no test coverage detected