** "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'. */
| 297 | ** See explanation about 'deadok' in function 'equalkey'. |
| 298 | */ |
| 299 | static const TValue *getgeneric (Table *t, const TValue *key, int deadok) { |
| 300 | Node *n = mainpositionTV(t, key); |
| 301 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 302 | if (equalkey(key, n, deadok)) |
| 303 | return gval(n); /* that's it */ |
| 304 | else { |
| 305 | int nx = gnext(n); |
| 306 | if (nx == 0) |
| 307 | return &absentkey; /* not found */ |
| 308 | n += nx; |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | |
| 314 | /* |
no test coverage detected