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

Function luaH_getshortstr

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

** search function for short strings */

Source from the content-addressed store, hash-verified

544** search function for short strings
545*/
546const TValue *luaH_getshortstr (Table *t, TString *key) {
547 Node *n = hashstr(t, key);
548 lua_assert(key->tt == LUA_TSHRSTR);
549 for (;;) { /* check whether 'key' is somewhere in the chain */
550 const TValue *k = gkey(n);
551 if (ttisshrstring(k) && eqshrstr(tsvalue(k), key))
552 return gval(n); /* that's it */
553 else {
554 int nx = gnext(n);
555 if (nx == 0)
556 return luaO_nilobject; /* not found */
557 n += nx;
558 }
559 }
560}
561
562
563/*

Callers 5

luaT_gettmFunction · 0.85
luaT_gettmbyobjFunction · 0.85
luaT_objtypenameFunction · 0.85
luaH_getstrFunction · 0.85
luaH_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected