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

Function get_instance

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

Source from the content-addressed store, hash-verified

302 }
303
304 LUABIND_API object_rep* get_instance(lua_State* L, int index)
305 {
306 object_rep* result = static_cast<object_rep*>(lua_touserdata(L, index));
307
308 if (!result || !lua_getmetatable(L, index))
309 return 0;
310
311 lua_rawgeti(L, -1, 1);
312
313 if (lua_tocfunction(L, -1) != &get_instance_value)
314 result = 0;
315
316 lua_pop(L, 2);
317
318 return result;
319 }
320
321 LUABIND_API object_rep* push_new_instance(lua_State* L, class_rep* cls)
322 {

Callers 4

dispatch_operatorFunction · 0.70
stack_content_by_nameMethod · 0.70
obj_nameFunction · 0.50

Calls 4

lua_touserdataFunction · 0.85
lua_getmetatableFunction · 0.85
lua_rawgetiFunction · 0.85
lua_tocfunctionFunction · 0.85

Tested by

no test coverage detected