MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaS_hash

Function luaS_hash

ThirdParty/lua/lua/lstring.c:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

makeseedFunction · 0.85
mainpositionFunction · 0.85
internshrstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected