** search function for short strings */
| 771 | ** search function for short strings |
| 772 | */ |
| 773 | const TValue *luaH_getshortstr (Table *t, TString *key) { |
| 774 | Node *n = hashstr(t, key); |
| 775 | lua_assert(key->tt == LUA_VSHRSTR); |
| 776 | for (;;) { /* check whether 'key' is somewhere in the chain */ |
| 777 | if (keyisshrstr(n) && eqshrstr(keystrval(n), key)) |
| 778 | return gval(n); /* that's it */ |
| 779 | else { |
| 780 | int nx = gnext(n); |
| 781 | if (nx == 0) |
| 782 | return &absentkey; /* not found */ |
| 783 | n += nx; |
| 784 | } |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | |
| 789 | const TValue *luaH_getstr (Table *t, TString *key) { |
no outgoing calls
no test coverage detected