MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaS_eqlngstr

Function luaS_eqlngstr

depends/lua/src/lstring.c:40–46  ·  view source on GitHub ↗

** equality for long strings */

Source from the content-addressed store, hash-verified

38** equality for long strings
39*/
40int luaS_eqlngstr (TString *a, TString *b) {
41 size_t len = a->u.lnglen;
42 lua_assert(a->tt == LUA_TLNGSTR && b->tt == LUA_TLNGSTR);
43 return (a == b) || /* same instance or... */
44 ((len == b->u.lnglen) && /* equal length and ... */
45 (memcmp(getstr(a), getstr(b), len) == 0)); /* equal contents */
46}
47
48
49unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {

Callers 1

luaV_equalobjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected