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