** search function for short strings */
| 466 | ** search function for short strings |
| 467 | */ |
| 468 | const TValue *luaH_getstr (Table *t, TString *key) { |
| 469 | Node *n = hashstr(t, key); |
| 470 | lua_assert(key->tsv.tt == LUA_TSHRSTR); |
| 471 | do { /* check whether `key' is somewhere in the chain */ |
| 472 | if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key)) |
| 473 | return gval(n); /* that's it */ |
| 474 | else n = gnext(n); |
| 475 | } while (n); |
| 476 | return luaO_nilobject; |
| 477 | } |
| 478 | |
| 479 | |
| 480 | /* |
no outgoing calls
no test coverage detected