MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaS_hash

Function luaS_hash

extlibs/lua/src/lstring.c:53–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53unsigned int luaS_hash (const char *str, size_t l, unsigned int seed,
54 size_t step) {
55 unsigned int h = seed ^ cast_uint(l);
56 for (; l >= step; l -= step)
57 h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1]));
58 return h;
59}
60
61
62unsigned 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