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

Function luaH_getshortstr

lib/lua/src/ltable.c:773–786  ·  view source on GitHub ↗

** search function for short strings */

Source from the content-addressed store, hash-verified

771** search function for short strings
772*/
773const TValue *luaH_getshortstr (Table *t, TString *key) {
774 Node *n = hashstr(t, key);
775 lua_assert(key->tt == LUA_VSHRSTR);
776 for (;;) { /* check whether 'key' is somewhere in the chain */
777 if (keyisshrstr(n) && eqshrstr(keystrval(n), key))
778 return gval(n); /* that's it */
779 else {
780 int nx = gnext(n);
781 if (nx == 0)
782 return &absentkey; /* not found */
783 n += nx;
784 }
785 }
786}
787
788
789const 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