MCPcopy Create free account
hub / github.com/crownengine/crown / luaH_getstr

Function luaH_getstr

3rdparty/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.70
luaT_gettmbyobjFunction · 0.70
luaH_getFunction · 0.70
luaH_setstrFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected