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

Function cv_cleanup

tests/test_conditional_variants.c:109–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static void cv_cleanup(cv_proj_t *p) {
110 if (p->store) {
111 cbm_store_close(p->store);
112 }
113 if (p->srv) {
114 cbm_mcp_server_free(p->srv);
115 }
116 if (p->dbpath[0]) {
117 char side[1100];
118 unlink(p->dbpath);
119 snprintf(side, sizeof(side), "%s-wal", p->dbpath);
120 unlink(side);
121 snprintf(side, sizeof(side), "%s-shm", p->dbpath);
122 unlink(side);
123 }
124 free(p->project);
125 if (p->tmpdir[0]) {
126 th_rmtree(p->tmpdir);
127 }
128 memset(p, 0, sizeof(*p));
129}
130
131/* One integer from SQL with text parameters; -1 on any query failure. */
132static int cv_count(cv_proj_t *p, const char *sql, const char *a, const char *b) {

Callers 3

cv_runFunction · 0.85
cv_platform_checkFunction · 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