MCPcopy Create free account
hub / github.com/Tencent/xLua / lua_seti

Function lua_seti

WebGLPlugins/lapi.c:782–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

780
781
782LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) {
783 StkId t;
784 const TValue *slot;
785 lua_lock(L);
786 api_checknelems(L, 1);
787 t = index2addr(L, idx);
788 if (luaV_fastset(L, t, n, slot, luaH_getint, L->top - 1))
789 L->top--; /* pop value */
790 else {
791 setivalue(L->top, n);
792 api_incr_top(L);
793 luaV_finishset(L, t, L->top - 1, L->top - 2, slot);
794 L->top -= 2; /* pop value and key */
795 }
796 lua_unlock(L);
797}
798
799
800LUA_API void lua_rawset (lua_State *L, int idx) {

Callers 5

tinsertFunction · 0.85
tremoveFunction · 0.85
tmoveFunction · 0.85
packFunction · 0.85
set2Function · 0.85

Calls 2

index2addrFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by

no test coverage detected