** "Generic" get version. (Not that generic: not valid for integers, ** which may be in array part, nor for floats with integral values.) */
| 253 | ** which may be in array part, nor for floats with integral values.) |
| 254 | */ |
| 255 | static const TValue *getgeneric (Table *t, const TValue *key) { |
| 256 | Node *n = mainpositionTV(t, key); |
| 257 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 258 | if (equalkey(key, n)) |
| 259 | return gval(n); /* that's it */ |
| 260 | else { |
| 261 | int nx = gnext(n); |
| 262 | if (nx == 0) |
| 263 | return &absentkey; /* not found */ |
| 264 | n += nx; |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | |
| 270 | /* |
no test coverage detected