| 60 | |
| 61 | |
| 62 | unsigned 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 | |
| 74 | static void tablerehash (TString **vect, int osize, int nsize) { |
no test coverage detected