| 833 | |
| 834 | |
| 835 | LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) { |
| 836 | TValue *t; |
| 837 | const TValue *slot; |
| 838 | lua_lock(L); |
| 839 | api_checknelems(L, 1); |
| 840 | t = index2value(L, idx); |
| 841 | if (luaV_fastgeti(L, t, n, slot)) { |
| 842 | luaV_finishfastset(L, t, slot, s2v(L->top - 1)); |
| 843 | } |
| 844 | else { |
| 845 | TValue aux; |
| 846 | setivalue(&aux, n); |
| 847 | luaV_finishset(L, t, &aux, s2v(L->top - 1), slot); |
| 848 | } |
| 849 | L->top--; /* pop value */ |
| 850 | lua_unlock(L); |
| 851 | } |
| 852 | |
| 853 | |
| 854 | static void aux_rawset (lua_State *L, int idx, TValue *key, int n) { |