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

Function intern_hash

src/foundation/str_intern.c:21–28  ·  view source on GitHub ↗

FNV-1a for interning (matches hash_table.c) */

Source from the content-addressed store, hash-verified

19
20/* FNV-1a for interning (matches hash_table.c) */
21static uint32_t intern_hash(const char *s, size_t len) {
22 uint32_t h = FNV_OFFSET_BASIS;
23 for (size_t i = 0; i < len; i++) {
24 h ^= (unsigned char)s[i];
25 h *= FNV_PRIME;
26 }
27 return h;
28}
29
30/* Bucket for open-addressing */
31typedef struct {

Callers 1

cbm_intern_nFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected