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

Function luaS_hashlongstr

extlibs/lua/src/lstring.c:62–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62unsigned int luaS_hashlongstr (TString *ts) {
63 lua_assert(ts->tt == LUA_VLNGSTR);
64 if (ts->extra == 0) { /* no hash? */
65 size_t len = ts->u.lnglen;
66 size_t step = (len >> LUAI_HASHLIMIT) + 1;
67 ts->hash = luaS_hash(getstr(ts), len, ts->hash, step);
68 ts->extra = 1; /* now it has its hash */
69 }
70 return ts->hash;
71}
72
73
74static void tablerehash (TString **vect, int osize, int nsize) {

Callers 1

mainpositionFunction · 0.85

Calls 1

luaS_hashFunction · 0.85

Tested by

no test coverage detected