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