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

Function getgeneric

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

** "Generic" get version. (Not that generic: not valid for integers, ** which may be in array part, nor for floats with integral values.) */

Source from the content-addressed store, hash-verified

673** which may be in array part, nor for floats with integral values.)
674*/
675static const TValue *getgeneric(Table *t, const TValue *key) {
676 Node *n = mainposition(t, key);
677 for (;;) { /* check whether 'key' is somewhere in the chain */
678 if (luaV_rawequalobj(gkey(n), key))
679 return gval(n); /* that's it */
680 else {
681 int nx = gnext(n);
682 if (nx == 0)
683 return luaO_nilobject; /* not found */
684 n += nx;
685 }
686 }
687}
688
689
690const TValue *luaH_getstr(Table *t, TString *key) {

Callers 2

luaH_getstrFunction · 0.85
luaH_getFunction · 0.85

Calls 1

mainpositionFunction · 0.85

Tested by

no test coverage detected