MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaS_hash

Function luaS_hash

freebsd/contrib/openzfs/module/lua/lstring.c:50–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49
50unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {
51 unsigned int h = seed ^ cast(unsigned int, l);
52 size_t l1;
53 size_t step = (l >> LUAI_HASHLIMIT) + 1;
54 for (l1 = l; l1 >= step; l1 -= step)
55 h = h ^ ((h<<5) + (h>>2) + cast_byte(str[l1 - 1]));
56 return h;
57}
58
59
60/*

Callers 3

makeseedFunction · 0.85
mainpositionFunction · 0.85
internshrstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected