MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaH_getstr

Function luaH_getstr

third-party/lua-5.2.4/src/ltable.c:466–475  ·  view source on GitHub ↗

** search function for short strings */

Source from the content-addressed store, hash-verified

464** search function for short strings
465*/
466const TValue *luaH_getstr (Table *t, TString *key) {
467 Node *n = hashstr(t, key);
468 lua_assert(key->tsv.tt == LUA_TSHRSTR);
469 do { /* check whether `key' is somewhere in the chain */
470 if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key))
471 return gval(n); /* that's it */
472 else n = gnext(n);
473 } while (n);
474 return luaO_nilobject;
475}
476
477
478/*

Callers 3

luaT_gettmFunction · 0.70
luaT_gettmbyobjFunction · 0.70
luaH_getFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected