| 906 | |
| 907 | |
| 908 | LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) { |
| 909 | TValue *t; |
| 910 | int hres; |
| 911 | lua_lock(L); |
| 912 | api_checkpop(L, 1); |
| 913 | t = index2value(L, idx); |
| 914 | luaV_fastseti(t, n, s2v(L->top.p - 1), hres); |
| 915 | if (hres == HOK) |
| 916 | luaV_finishfastset(L, t, s2v(L->top.p - 1)); |
| 917 | else { |
| 918 | TValue temp; |
| 919 | setivalue(&temp, n); |
| 920 | luaV_finishset(L, t, &temp, s2v(L->top.p - 1), hres); |
| 921 | } |
| 922 | L->top.p--; /* pop value */ |
| 923 | lua_unlock(L); |
| 924 | } |
| 925 | |
| 926 | |
| 927 | static void aux_rawset (lua_State *L, int idx, TValue *key, int n) { |
no test coverage detected