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

Method tableGet

source/core/StarLua.cpp:798–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796}
797
798LuaValue LuaEngine::tableGet(bool raw, int handleIndex, LuaValue const& key) {
799 lua_checkstack(m_state, 1);
800
801 pushHandle(m_state, handleIndex);
802 pushLuaValue(m_state, key);
803 if (raw)
804 lua_rawget(m_state, -2);
805 else
806 lua_gettable(m_state, -2);
807
808 LuaValue v = popLuaValue(m_state);
809 lua_pop(m_state, 1);
810 return v;
811}
812
813LuaValue LuaEngine::tableGet(bool raw, int handleIndex, char const* key) {
814 lua_checkstack(m_state, 1);

Callers 4

containsMethod · 0.80
getMethod · 0.80
containsMethod · 0.80
rawGetMethod · 0.80

Calls 4

lua_checkstackFunction · 0.85
lua_rawgetFunction · 0.85
lua_gettableFunction · 0.85
lua_getfieldFunction · 0.85

Tested by

no test coverage detected