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

Function luaH_getshortstr

extlibs/lua/src/ltable.c:711–724  ·  view source on GitHub ↗

** search function for short strings */

Source from the content-addressed store, hash-verified

709** search function for short strings
710*/
711const TValue *luaH_getshortstr (Table *t, TString *key) {
712 Node *n = hashstr(t, key);
713 lua_assert(key->tt == LUA_VSHRSTR);
714 for (;;) { /* check whether 'key' is somewhere in the chain */
715 if (keyisshrstr(n) && eqshrstr(keystrval(n), key))
716 return gval(n); /* that's it */
717 else {
718 int nx = gnext(n);
719 if (nx == 0)
720 return &absentkey; /* not found */
721 n += nx;
722 }
723 }
724}
725
726
727const TValue *luaH_getstr (Table *t, TString *key) {

Callers 5

luaT_gettmFunction · 0.85
luaT_gettmbyobjFunction · 0.85
luaT_objtypenameFunction · 0.85
luaH_getstrFunction · 0.85
luaH_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected