MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaH_get

Function luaH_get

extlibs/lua/src/ltable.c:741–755  ·  view source on GitHub ↗

** main search function */

Source from the content-addressed store, hash-verified

739** main search function
740*/
741const TValue *luaH_get (Table *t, const TValue *key) {
742 switch (ttypetag(key)) {
743 case LUA_VSHRSTR: return luaH_getshortstr(t, tsvalue(key));
744 case LUA_VNUMINT: return luaH_getint(t, ivalue(key));
745 case LUA_VNIL: return &absentkey;
746 case LUA_VNUMFLT: {
747 lua_Integer k;
748 if (luaV_flttointeger(fltvalue(key), &k, F2Ieq)) /* integral index? */
749 return luaH_getint(t, k); /* use specialized version */
750 /* else... */
751 } /* FALLTHROUGH */
752 default:
753 return getgeneric(t, key);
754 }
755}
756
757
758/*

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_flttointegerFunction · 0.85
getgenericFunction · 0.85

Tested by

no test coverage detected