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

Function luaS_eqlngstr

extlibs/lua/src/lstring.c:44–50  ·  view source on GitHub ↗

** equality for long strings */

Source from the content-addressed store, hash-verified

42** equality for long strings
43*/
44int 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
53unsigned int luaS_hash (const char *str, size_t l, unsigned int seed,

Callers 2

luaV_equalobjFunction · 0.85
equalkeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected