MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaH_getstr

Function luaH_getstr

other_src/lua/src/ltable.cpp:458–466  ·  view source on GitHub ↗

** search function for strings */

Source from the content-addressed store, hash-verified

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

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