| 607 | |
| 608 | |
| 609 | static int auxgetstr (lua_State *L, const TValue *t, const char *k) { |
| 610 | const TValue *slot; |
| 611 | TString *str = luaS_new(L, k); |
| 612 | if (luaV_fastget(L, t, str, slot, luaH_getstr)) { |
| 613 | setobj2s(L, L->top, slot); |
| 614 | api_incr_top(L); |
| 615 | } |
| 616 | else { |
| 617 | setsvalue2s(L, L->top, str); |
| 618 | api_incr_top(L); |
| 619 | luaV_finishget(L, t, s2v(L->top - 1), L->top - 1, slot); |
| 620 | } |
| 621 | lua_unlock(L); |
| 622 | return ttype(s2v(L->top - 1)); |
| 623 | } |
| 624 | |
| 625 | |
| 626 | LUA_API int lua_getglobal (lua_State *L, const char *name) { |
no test coverage detected