MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / rawSetField

Method rawSetField

source/core/StarLua.cpp:1309–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1307int LuaEngine::s_luaRecursionLimitExceptionKey = 0;
1308
1309void LuaDetail::rawSetField(lua_State* state, int index, char const* key) {
1310 lua_checkstack(state, 1);
1311
1312 int absTableIndex = lua_absindex(state, index);
1313 lua_pushstring(state, key);
1314
1315 // Move the newly pushed key to the secont to top spot, leaving the value in
1316 // the top spot.
1317 lua_insert(state, -2);
1318
1319 // Pops the value and the key
1320 lua_rawset(state, absTableIndex);
1321}
1322
1323void LuaDetail::rawGetField(lua_State* state, int index, char const* key) {
1324 lua_checkstack(state, 2);

Callers

nothing calls this directly

Calls 4

lua_checkstackFunction · 0.85
lua_absindexFunction · 0.85
lua_pushstringFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected