MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_seti

Function lua_seti

src/Chain/libraries/glua/lapi.cpp:785–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

tinsertFunction · 0.85
tappendFunction · 0.85
tremoveFunction · 0.85
tmoveFunction · 0.85
packFunction · 0.85
set2Function · 0.85
str_splitFunction · 0.85

Calls 2

index2addrFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by

no test coverage detected