MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / get_instance_value

Function get_instance_value

Source/Misc/luabind/src/object_rep.cpp:154–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 int get_instance_value(lua_State* L)
155 {
156 lua_getuservalue(L, 1);
157 lua_pushvalue(L, 2);
158 lua_rawget(L, -2);
159
160 if (lua_isnil(L, -1) && lua_getmetatable(L, -2))
161 {
162 lua_pushvalue(L, 2);
163 lua_rawget(L, -2);
164 }
165
166 if (lua_tocfunction(L, -1) == &property_tag)
167 {
168 // this member is a property, extract the "get" function and call it.
169 lua_getupvalue(L, -1, 1);
170 lua_pushvalue(L, 1);
171 lua_call(L, 1, 1);
172 }
173
174 return 1;
175 }
176
177 int dispatch_operator(lua_State* L)
178 {

Callers

nothing calls this directly

Calls 6

lua_pushvalueFunction · 0.85
lua_rawgetFunction · 0.85
lua_getmetatableFunction · 0.85
lua_tocfunctionFunction · 0.85
lua_getupvalueFunction · 0.85
lua_callFunction · 0.85

Tested by

no test coverage detected