| 586 | |
| 587 | |
| 588 | static int auxgetstr (lua_State *L, const TValue *t, const char *k) { |
| 589 | const TValue *slot; |
| 590 | TString *str = luaS_new(L, k); |
| 591 | if (luaV_fastget(L, t, str, slot, luaH_getstr)) { |
| 592 | setobj2s(L, L->top, slot); |
| 593 | api_incr_top(L); |
| 594 | } |
| 595 | else { |
| 596 | setsvalue2s(L, L->top, str); |
| 597 | api_incr_top(L); |
| 598 | luaV_finishget(L, t, L->top - 1, L->top - 1, slot); |
| 599 | } |
| 600 | lua_unlock(L); |
| 601 | return ttnov(L->top - 1); |
| 602 | } |
| 603 | |
| 604 | |
| 605 | LUA_API int lua_getglobal (lua_State *L, const char *name) { |
no test coverage detected