| 113 | } |
| 114 | |
| 115 | static void pb_cleanup(ProbeLangProj *lp, cbm_store_t *store) { |
| 116 | if (store) cbm_store_close(store); |
| 117 | if (lp->srv) { cbm_mcp_server_free(lp->srv); lp->srv = NULL; } |
| 118 | free(lp->project); lp->project = NULL; |
| 119 | th_rmtree(lp->tmpdir); |
| 120 | unlink(lp->dbpath); |
| 121 | char wal[600], shm[600]; |
| 122 | snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath); |
| 123 | snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath); |
| 124 | unlink(wal); unlink(shm); |
| 125 | } |
| 126 | |
| 127 | /* Count nodes by label. Returns -1 on store error. */ |
| 128 | static int pb_count_label(cbm_store_t *store, const char *project, const char *label) { |
no test coverage detected