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

Method field_setter_not_impl

gi/object.cpp:1008–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1006}
1007
1008bool ObjectInstance::field_setter_not_impl(JSContext* cx,
1009 GI::AutoFieldInfo const& field) {
1010 if (!check_gobject_finalized("set GObject field on"))
1011 return true;
1012
1013 /* As far as I know, GI never exposes GObject instance struct fields as
1014 * writable, so no need to implement this for the time being */
1015 if (field.is_writable()) {
1016 g_message(
1017 "Field %s of a GObject is writable, but setting it is not "
1018 "implemented",
1019 field.name());
1020 return true;
1021 }
1022
1023 return gjs_wrapper_throw_readonly_field(cx, gtype(), field.name());
1024}
1025
1026bool ObjectPrototype::is_vfunc_unchanged(const GI::VFuncInfo& info) const {
1027 GType ptype = g_type_parent(m_gtype);

Callers 1

field_setterMethod · 0.80

Calls 3

is_writableMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected