MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / getgeneric

Function getgeneric

third-party/lua-5.5.0/src/ltable.c:291–303  ·  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.) ** See explanation about 'deadok' in function 'equalkey'. */

Source from the content-addressed store, hash-verified

289** See explanation about 'deadok' in function 'equalkey'.
290*/
291static const TValue *getgeneric (Table *t, const TValue *key, int deadok) {
292 Node *n = mainpositionTV(t, key);
293 for (;;) { /* check whether 'key' is somewhere in the chain */
294 if (equalkey(key, n, deadok))
295 return gval(n); /* that's it */
296 else {
297 int nx = gnext(n);
298 if (nx == 0)
299 return &absentkey; /* not found */
300 n += nx;
301 }
302 }
303}
304
305
306/*

Callers 5

findindexFunction · 0.70
insertkeyFunction · 0.70
HgetlongstrFunction · 0.70
luaH_getFunction · 0.70
luaH_psetFunction · 0.70

Calls 2

mainpositionTVFunction · 0.70
equalkeyFunction · 0.70

Tested by

no test coverage detected