** equality for long strings */
| 42 | ** equality for long strings |
| 43 | */ |
| 44 | int luaS_eqlngstr (TString *a, TString *b) { |
| 45 | size_t len = a->u.lnglen; |
| 46 | lua_assert(a->tt == LUA_VLNGSTR && b->tt == LUA_VLNGSTR); |
| 47 | return (a == b) || /* same instance or... */ |
| 48 | ((len == b->u.lnglen) && /* equal length and ... */ |
| 49 | (memcmp(getstr(a), getstr(b), len) == 0)); /* equal contents */ |
| 50 | } |
| 51 | |
| 52 | |
| 53 | unsigned int luaS_hash (const char *str, size_t l, unsigned int seed, |
no outgoing calls
no test coverage detected