MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaH_getstr

Function luaH_getstr

deps/lua/src/ltable.c:455–463  ·  view source on GitHub ↗

** search function for strings */

Source from the content-addressed store, hash-verified

453** search function for strings
454*/
455const TValue *luaH_getstr (Table *t, TString *key) {
456 Node *n = hashstr(t, key);
457 do { /* check whether `key' is somewhere in the chain */
458 if (ttisstring(gkey(n)) && rawtsvalue(gkey(n)) == key)
459 return gval(n); /* that's it */
460 else n = gnext(n);
461 } while (n);
462 return luaO_nilobject;
463}
464
465
466/*

Callers 4

luaT_gettmFunction · 0.85
luaT_gettmbyobjFunction · 0.85
luaH_getFunction · 0.85
luaH_setstrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected