| 666 | |
| 667 | |
| 668 | LUA_API int lua_gettable (lua_State *L, int idx) { |
| 669 | const TValue *slot; |
| 670 | TValue *t; |
| 671 | lua_lock(L); |
| 672 | t = index2value(L, idx); |
| 673 | if (luaV_fastget(L, t, s2v(L->top - 1), slot, luaH_get)) { |
| 674 | setobj2s(L, L->top - 1, slot); |
| 675 | } |
| 676 | else |
| 677 | luaV_finishget(L, t, s2v(L->top - 1), L->top - 1, slot); |
| 678 | lua_unlock(L); |
| 679 | return ttype(s2v(L->top - 1)); |
| 680 | } |
| 681 | |
| 682 | |
| 683 | LUA_API int lua_getfield (lua_State *L, int idx, const char *k) { |
no test coverage detected