MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaH_get

Function luaH_get

libraries/AP_Scripting/lua/src/ltable.c:596–610  ·  view source on GitHub ↗

** main search function */

Source from the content-addressed store, hash-verified

594** main search function
595*/
596const TValue *luaH_get (Table *t, const TValue *key) {
597 switch (ttype(key)) {
598 case LUA_TSHRSTR: return luaH_getshortstr(t, tsvalue(key));
599 case LUA_TNUMINT: return luaH_getint(t, ivalue(key));
600 case LUA_TNIL: return luaO_nilobject;
601 case LUA_TNUMFLT: {
602 lua_Integer k;
603 if (luaV_tointeger(key, &k, 0)) /* index is int? */
604 return luaH_getint(t, k); /* use specialized version */
605 /* else... */
606 } /* FALLTHROUGH */
607 default:
608 return getgeneric(t, key);
609 }
610}
611
612
613/*

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