** "Generic" get version. (Not that generic: not valid for integers, ** which may be in array part, nor for floats with integral values.) */
| 558 | ** which may be in array part, nor for floats with integral values.) |
| 559 | */ |
| 560 | static const TValue *getgeneric (Table *t, const TValue *key) { |
| 561 | Node *n = mainposition(t, key); |
| 562 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 563 | if (luaV_rawequalobj(gkey(n), key)) |
| 564 | return gval(n); /* that's it */ |
| 565 | else { |
| 566 | int nx = gnext(n); |
| 567 | if (nx == 0) |
| 568 | return luaO_nilobject; /* not found */ |
| 569 | n += nx; |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | |
| 575 | const TValue *luaH_getstr (Table *t, TString *key) { |
no test coverage detected