MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaS_hash

Function luaS_hash

3rd/lua-5.4.3/src/lstring.c:43–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {
44 unsigned int h = seed ^ cast_uint(l);
45 for (; l > 0; l--)
46 h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1]));
47 return h;
48}
49
50
51unsigned int luaS_hashlongstr (TString *ts) {

Callers 3

luai_makeseedFunction · 0.85
luaS_hashlongstrFunction · 0.85
internshrstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected