MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaS_hash

Function luaS_hash

third-party/lua-5.2.4/src/lstring.c:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

makeseedFunction · 0.70
mainpositionFunction · 0.70
internshrstrFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected