MCPcopy Create free account
hub / github.com/axmolengine/axmol / lua_settable

Function lua_settable

3rdparty/lua/plainlua/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 15

luaL_getsubtableFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setiFunction · 0.85
pushMethod · 0.85
field_setterClass · 0.85
tolua_pushfieldvalueFunction · 0.85
tolua_pushfieldbooleanFunction · 0.85
tolua_pushfieldnumberFunction · 0.85
tolua_pushfieldstringFunction · 0.85
tolua_pushfielduserdataFunction · 0.85
tolua_pushfieldusertypeFunction · 0.85

Calls 2

index2valueFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by

no test coverage detected