** search function for short strings */
| 709 | ** search function for short strings |
| 710 | */ |
| 711 | const TValue *luaH_getshortstr (Table *t, TString *key) { |
| 712 | Node *n = hashstr(t, key); |
| 713 | lua_assert(key->tt == LUA_VSHRSTR); |
| 714 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 715 | if (keyisshrstr(n) && eqshrstr(keystrval(n), key)) |
| 716 | return gval(n); /* that's it */ |
| 717 | else { |
| 718 | int nx = gnext(n); |
| 719 | if (nx == 0) |
| 720 | return &absentkey; /* not found */ |
| 721 | n += nx; |
| 722 | } |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | |
| 727 | const TValue *luaH_getstr (Table *t, TString *key) { |
no outgoing calls
no test coverage detected