MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaH_get

Function luaH_get

lib/lua/src/ltable.c:803–817  ·  view source on GitHub ↗

** main search function */

Source from the content-addressed store, hash-verified

801** main search function
802*/
803const TValue *luaH_get (Table *t, const TValue *key) {
804 switch (ttypetag(key)) {
805 case LUA_VSHRSTR: return luaH_getshortstr(t, tsvalue(key));
806 case LUA_VNUMINT: return luaH_getint(t, ivalue(key));
807 case LUA_VNIL: return &absentkey;
808 case LUA_VNUMFLT: {
809 lua_Integer k;
810 if (luaV_flttointeger(fltvalue(key), &k, F2Ieq)) /* integral index? */
811 return luaH_getint(t, k); /* use specialized version */
812 /* else... */
813 } /* FALLTHROUGH */
814 default:
815 return getgeneric(t, key, 0);
816 }
817}
818
819
820/*

Callers 4

luaH_setFunction · 0.85
lua_rawgetFunction · 0.85
lua_rawgetpFunction · 0.85
addkFunction · 0.85

Calls 4

luaH_getshortstrFunction · 0.85
luaH_getintFunction · 0.85
luaV_flttointegerFunction · 0.85
getgenericFunction · 0.85

Tested by

no test coverage detected