MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaH_get

Function luaH_get

src/Chain/libraries/glua/ltable.cpp:704–718  ·  view source on GitHub ↗

** main search function */

Source from the content-addressed store, hash-verified

702** main search function
703*/
704const TValue *luaH_get(Table *t, const TValue *key) {
705 switch (ttype(key)) {
706 case LUA_TSHRSTR: return luaH_getshortstr(t, tsvalue(key));
707 case LUA_TNUMINT: return luaH_getint(t, ivalue(key));
708 case LUA_TNIL: return luaO_nilobject;
709 case LUA_TNUMFLT: {
710 lua_Integer k;
711 if (luaV_tointeger(key, &k, 0)) /* index is int? */
712 return luaH_getint(t, k); /* use specialized version */
713 /* else... */
714 } /* FALLTHROUGH */
715 default:
716 return getgeneric(t, key);
717 }
718}
719
720
721/*

Callers 3

luaH_setFunction · 0.85
lua_rawgetFunction · 0.85
lua_rawgetpFunction · 0.85

Calls 4

luaH_getshortstrFunction · 0.85
luaH_getintFunction · 0.85
luaV_tointegerFunction · 0.85
getgenericFunction · 0.85

Tested by

no test coverage detected