MCPcopy Create free account
hub / github.com/defold/defold / lua_setfield

Function lua_setfield

engine/lua/src/lua/lapi.c:657–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655
656
657LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {
658 StkId t;
659 TValue key;
660 lua_lock(L);
661 api_checknelems(L, 1);
662 t = index2adr(L, idx);
663 api_checkvalidindex(L, t);
664 setsvalue(L, &key, luaS_new(L, k));
665 luaV_settable(L, t, &key, L->top - 1);
666 L->top--; /* pop value */
667 lua_unlock(L);
668}
669
670
671LUA_API void lua_rawset (lua_State *L, int idx) {

Callers 15

CompScriptOnInputFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
Resource_GetMountsFunction · 0.85
InitializeModuleFunction · 0.85
Sys_GetIfaddrsFunction · 0.85
Sys_SetErrorHandlerFunction · 0.85
InitializeFunction · 0.85
RegisterUserTypeLocalFunction · 0.85
BacktraceErrorHandlerFunction · 0.85
DDFToLuaValueFunction · 0.85
PushDDFNoDecoderFunction · 0.85

Calls 2

index2adrFunction · 0.85
luaV_settableFunction · 0.85

Tested by 12

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TestStringMethod · 0.68
TestNumberMethod · 0.68
TestHashMethod · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
SetupCyclicTableFunction · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68