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

Function add_overload

Source/Misc/luabind/src/function.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67} // namespace unnamed
68
69LUABIND_API void add_overload(
70 object const& context, char const* name, object const& fn)
71{
72 function_object* f = *touserdata<function_object*>(getupvalue(fn, 1));
73 f->name = name;
74
75 if (object overloads = context[name])
76 {
77 if (is_luabind_function(overloads) && is_luabind_function(fn))
78 {
79 f->next = *touserdata<function_object*>(getupvalue(overloads, 1));
80 f->keepalive = overloads;
81 }
82 }
83
84 context[name] = fn;
85}
86
87LUABIND_API object make_function_aux(lua_State* L, function_object* impl)
88{

Callers 4

set_package_preloadFunction · 0.85
register_Method · 0.85
register_Method · 0.85
register_Method · 0.85

Calls 2

getupvalueFunction · 0.85
is_luabind_functionFunction · 0.85

Tested by

no test coverage detected