** "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'. */
| 289 | ** See explanation about 'deadok' in function 'equalkey'. |
| 290 | */ |
| 291 | static 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 | /* |
no test coverage detected