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

Method add_dependency

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

Source from the content-addressed store, hash-verified

47 }
48
49 void object_rep::add_dependency(lua_State* L, int index)
50 {
51 assert(m_dependency_cnt < sizeof(object_rep));
52
53 void* key = reinterpret_cast<char*>(this) + m_dependency_cnt;
54
55 lua_pushlightuserdata(L, key);
56 lua_pushvalue(L, index);
57 lua_rawset(L, LUA_REGISTRYINDEX);
58
59 ++m_dependency_cnt;
60 }
61
62 void object_rep::release_dependency_refs(lua_State* L)
63 {

Callers 1

postcallMethod · 0.80

Calls 3

lua_pushlightuserdataFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected