MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaH_getstr

Function luaH_getstr

Source/Misc/lua/src/lua.c:9695–9703  ·  view source on GitHub ↗

** search function for strings */

Source from the content-addressed store, hash-verified

9693** search function for strings
9694*/
9695const TValue *luaH_getstr (Table *t, TString *key) {
9696Node *n = hashstr(t, key);
9697do { /* check whether `key' is somewhere in the chain */
9698if (ttisstring(gkey(n)) && rawtsvalue(gkey(n)) == key)
9699return gval(n); /* that's it */
9700else n = gnext(n);
9701} while (n);
9702return luaO_nilobject;
9703}
9704
9705
9706/*

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected