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

Function cbm_variant_key

internal/cbm/cbm.c:2868–2878  ·  view source on GitHub ↗

FNV-1a over the QN, a separator and the label. */

Source from the content-addressed store, hash-verified

2866
2867/* FNV-1a over the QN, a separator and the label. */
2868static uint64_t cbm_variant_key(const char *qn, const char *label) {
2869 uint64_t h = 1469598103934665603ULL;
2870 for (const char *p = qn; *p; p++) {
2871 h = (h ^ (unsigned char)*p) * 1099511628211ULL;
2872 }
2873 h = (h ^ 0xffU) * 1099511628211ULL;
2874 for (const char *p = label; *p; p++) {
2875 h = (h ^ (unsigned char)*p) * 1099511628211ULL;
2876 }
2877 return h;
2878}
2879
2880/* refs[0..n) is one (QN, label) group in span order: give every member the
2881 * list of the group's distinct spans. */

Callers 1

cbm_mark_def_variantsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected