| 857 | |
| 858 | |
| 859 | LUA_API void lua_settable (lua_State *L, int idx) { |
| 860 | TValue *t; |
| 861 | const TValue *slot; |
| 862 | lua_lock(L); |
| 863 | api_checknelems(L, 2); |
| 864 | t = index2value(L, idx); |
| 865 | if (luaV_fastget(L, t, s2v(L->top - 2), slot, luaH_get)) { |
| 866 | luaV_finishfastset(L, t, slot, s2v(L->top - 1)); |
| 867 | } |
| 868 | else |
| 869 | luaV_finishset(L, t, s2v(L->top - 2), s2v(L->top - 1), slot); |
| 870 | L->top -= 2; /* pop index and value */ |
| 871 | lua_unlock(L); |
| 872 | } |
| 873 | |
| 874 | |
| 875 | LUA_API void lua_setfield (lua_State *L, int idx, const char *k) { |
nothing calls this directly
no test coverage detected