MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaH_getstr

Function luaH_getstr

freebsd/contrib/openzfs/module/lua/ltable.c:468–477  ·  view source on GitHub ↗

** search function for short strings */

Source from the content-addressed store, hash-verified

466** search function for short strings
467*/
468const TValue *luaH_getstr (Table *t, TString *key) {
469 Node *n = hashstr(t, key);
470 lua_assert(key->tsv.tt == LUA_TSHRSTR);
471 do { /* check whether `key' is somewhere in the chain */
472 if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key))
473 return gval(n); /* that's it */
474 else n = gnext(n);
475 } while (n);
476 return luaO_nilobject;
477}
478
479
480/*

Callers 3

luaT_gettmFunction · 0.70
luaT_gettmbyobjFunction · 0.70
luaH_getFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected