** "Generic" get version. (Not that generic: not valid for integers, ** which may be in array part, nor for floats with integral values.) */
| 673 | ** which may be in array part, nor for floats with integral values.) |
| 674 | */ |
| 675 | static 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 | |
| 690 | const TValue *luaH_getstr(Table *t, TString *key) { |
no test coverage detected