MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_lookup_object_constructor

Function gjs_lookup_object_constructor

gi/object.cpp:3902–3913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3900}
3901
3902bool gjs_lookup_object_constructor(JSContext* cx, GType gtype,
3903 JS::MutableHandleValue value_p) {
3904 GI::Repository repo;
3905 JSObject* constructor = gjs_lookup_object_constructor_from_info(
3906 cx, repo.find_by_gtype(gtype), gtype);
3907
3908 if (G_UNLIKELY(constructor == nullptr))
3909 return false;
3910
3911 value_p.setObject(*constructor);
3912 return true;
3913}
3914
3915void ObjectInstance::associate_string(GObject* obj, char* str) {
3916 auto* instance_strings = static_cast<GPtrArray*>(

Callers 4

gjs_object_constructorFunction · 0.85
gjs_lookup_constructorFunction · 0.85

Calls 2

find_by_gtypeMethod · 0.80

Tested by

no test coverage detected