MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / lua_settable

Function lua_settable

Dependencies/lua/src/lapi.c:855–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853
854
855LUA_API void lua_settable (lua_State *L, int idx) {
856 TValue *t;
857 const TValue *slot;
858 lua_lock(L);
859 api_checknelems(L, 2);
860 t = index2value(L, idx);
861 if (luaV_fastget(L, t, s2v(L->top.p - 2), slot, luaH_get)) {
862 luaV_finishfastset(L, t, slot, s2v(L->top.p - 1));
863 }
864 else
865 luaV_finishset(L, t, s2v(L->top.p - 2), s2v(L->top.p - 1), slot);
866 L->top.p -= 2; /* pop index and value */
867 lua_unlock(L);
868}
869
870
871LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {

Callers 8

pushMethod · 0.85
field_setterClass · 0.85
luaL_getsubtableFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setiFunction · 0.85
listcodeFunction · 0.85
runCFunction · 0.85
sethookauxFunction · 0.85

Calls 2

index2valueFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by 3

listcodeFunction · 0.68
runCFunction · 0.68
sethookauxFunction · 0.68