MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_seti

Function lua_seti

third-party/lua-5.5.0/src/lapi.c:908–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906
907
908LUA_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
927static void aux_rawset (lua_State *L, int idx, TValue *key, int n) {

Callers 4

tinsertFunction · 0.70
tremoveFunction · 0.70
tmoveFunction · 0.70
tpackFunction · 0.70

Calls 2

index2valueFunction · 0.70
luaV_finishsetFunction · 0.70

Tested by

no test coverage detected