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

Function imp_key_count

tests/test_importance.c:60–71  ·  view source on GitHub ↗

How many times the key appears. The duplicate-key corruption this suite * guards against shows up here as 2. */

Source from the content-addressed store, hash-verified

58/* How many times the key appears. The duplicate-key corruption this suite
59 * guards against shows up here as 2. */
60static int imp_key_count(const char *json) {
61 if (!json) {
62 return 0;
63 }
64 int n = 0;
65 const char *p = json;
66 while ((p = strstr(p, "\"importance\":")) != NULL) {
67 n++;
68 p += strlen("\"importance\":");
69 }
70 return n;
71}
72
73static void imp_run_pass(cbm_gbuf_t *gb) {
74 atomic_int cancelled = 0;

Callers 2

imp_check_labelFunction · 0.85
test_importance.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected