MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaS_eqlngstr

Function luaS_eqlngstr

lib/lua/src/lstring.c:34–40  ·  view source on GitHub ↗

** equality for long strings */

Source from the content-addressed store, hash-verified

32** equality for long strings
33*/
34int luaS_eqlngstr (TString *a, TString *b) {
35 size_t len = a->u.lnglen;
36 lua_assert(a->tt == LUA_VLNGSTR && b->tt == LUA_VLNGSTR);
37 return (a == b) || /* same instance or... */
38 ((len == b->u.lnglen) && /* equal length and ... */
39 (memcmp(getlngstr(a), getlngstr(b), len) == 0)); /* equal contents */
40}
41
42
43unsigned 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