| 847 | |
| 848 | |
| 849 | LUA_API void lua_settable (lua_State *L, int idx) { |
| 850 | TValue *t; |
| 851 | const TValue *slot; |
| 852 | lua_lock(L); |
| 853 | api_checknelems(L, 2); |
| 854 | t = index2value(L, idx); |
| 855 | if (luaV_fastget(L, t, s2v(L->top - 2), slot, luaH_get)) { |
| 856 | luaV_finishfastset(L, t, slot, s2v(L->top - 1)); |
| 857 | } |
| 858 | else |
| 859 | luaV_finishset(L, t, s2v(L->top - 2), s2v(L->top - 1), slot); |
| 860 | L->top -= 2; /* pop index and value */ |
| 861 | lua_unlock(L); |
| 862 | } |
| 863 | |
| 864 | |
| 865 | LUA_API void lua_setfield (lua_State *L, int idx, const char *k) { |
nothing calls this directly
no test coverage detected