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

Function hash_source_span

internal/cbm/extract_defs.c:58–64  ·  view source on GitHub ↗

Hash a span of source text. */

Source from the content-addressed store, hash-verified

56
57/* Hash a span of source text. */
58static uint32_t hash_source_span(const char *source, uint32_t start, int len) {
59 uint32_t h = 0;
60 for (int x = 0; x < len; x++) {
61 h = (h * FP_HASH_MUL) + (uint32_t)(unsigned char)source[start + (uint32_t)x];
62 }
63 return h;
64}
65
66/* Try to append a unique identifier to the buffer. Returns true if appended. */
67static bool try_append_ident(const char *source, uint32_t s, int len, uint32_t *seen, int seen_size,

Callers 1

try_append_identFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected