** search function for short strings */
| 754 | ** search function for short strings |
| 755 | */ |
| 756 | const TValue *luaH_getshortstr (Table *t, TString *key) { |
| 757 | Node *n = hashstr(t, key); |
| 758 | lua_assert(key->tt == LUA_VSHRSTR); |
| 759 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 760 | if (keyisshrstr(n) && eqshrstr(keystrval(n), key)) |
| 761 | return gval(n); /* that's it */ |
| 762 | else { |
| 763 | int nx = gnext(n); |
| 764 | if (nx == 0) |
| 765 | return &absentkey; /* not found */ |
| 766 | n += nx; |
| 767 | } |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | |
| 772 | const TValue *luaH_getstr (Table *t, TString *key) { |
no outgoing calls
no test coverage detected