MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / lang_cleanup

Function lang_cleanup

tests/test_lang_contract.c:148–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148static void lang_cleanup(LangProj *lp, cbm_store_t *store) {
149 if (store) {
150 cbm_store_close(store);
151 }
152 if (lp->srv) {
153 cbm_mcp_server_free(lp->srv);
154 lp->srv = NULL;
155 }
156 free(lp->project);
157 lp->project = NULL;
158 th_rmtree(lp->tmpdir);
159 unlink(lp->dbpath);
160 char wal[600];
161 char shm[600];
162 snprintf(wal, sizeof(wal), "%s-wal", lp->dbpath);
163 unlink(wal);
164 snprintf(shm, sizeof(shm), "%s-shm", lp->dbpath);
165 unlink(shm);
166}
167
168/* Count nodes of `label` with >=1 outbound edge. Returns -1 on query error. */
169static int label_with_outbound(cbm_store_t *store, const char *project, const char *label) {

Callers 3

lang_metricsFunction · 0.85
edge_presentFunction · 0.85

Calls 3

cbm_store_closeFunction · 0.85
cbm_mcp_server_freeFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected