]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Make DBusInterface[GS]etPropertyFunc usable
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 8 Jan 2019 13:23:24 +0000 (14:23 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 8 Jan 2019 15:36:04 +0000 (16:36 +0100)
These delegates don't place their target at the end, but their error
parameter. Vala does not support that at this point.

Introduced with 1df2c050ba29c84026a14e7ee23fa6bcd00b1044

See https://gitlab.gnome.org/GNOME/vala/issues/728

vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0-custom.vala
vapi/metadata/Gio-2.0.metadata

index 7c75ed664cdf34163e8ec21730af12039dae8a9b..7084bf0e5962331ab9a2e0756b0e48867020a2d0 100644 (file)
@@ -4775,12 +4775,14 @@ namespace GLib {
        [Version (since = "2.28")]
        public delegate bool CancellableSourceFunc (GLib.Cancellable? cancellable = null);
        [CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)]
-       public delegate GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name) throws GLib.Error;
+       [Version (since = "2.26")]
+       public delegate GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, out GLib.Error error);
        [CCode (cheader_filename = "gio/gio.h", instance_pos = 7.9)]
        [Version (since = "2.26")]
        public delegate void DBusInterfaceMethodCallFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string method_name, GLib.Variant parameters, owned GLib.DBusMethodInvocation invocation);
        [CCode (cheader_filename = "gio/gio.h", instance_pos = 7.9)]
-       public delegate bool DBusInterfaceSetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Variant value) throws GLib.Error;
+       [Version (since = "2.26")]
+       public delegate bool DBusInterfaceSetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Variant value, out GLib.Error error);
        [CCode (cheader_filename = "gio/gio.h", instance_pos = 3.9)]
        [Version (since = "2.26")]
        public delegate GLib.DBusMessage? DBusMessageFilterFunction (GLib.DBusConnection connection, owned GLib.DBusMessage message, bool incoming);
index d4965a1baa812fbabeaf978bcd9147d567dd9e76..b3cb7b95ddd1111562378f39a6efc0bb6b7949be 100644 (file)
@@ -182,10 +182,6 @@ namespace GLib {
        public delegate void TaskReadyCallback (GLib.Object? source_object, GLib.Task task);
        [CCode (has_target = false, cname = "GSourceFunc")]
        public delegate bool TaskSourceFunc (Task task);
-       [CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)]
-       public delegate GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name) throws GLib.Error;
-       [CCode (cheader_filename = "gio/gio.h", instance_pos = 7.9)]
-       public delegate bool DBusInterfaceSetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Variant value) throws GLib.Error;
 
        [CCode (cheader_filename = "gio/gio.h", has_target = false, cname = "GSettingsBindGetMapping")]
        public delegate bool SettingsBindGetMappingShared (GLib.Value value, GLib.Variant variant, void* user_data);
index 33aff2c900f0d5986db552a3bd895f9db5145cfe..d2747106432f25f5d3effbe2cd1d56ae31d204ee 100644 (file)
@@ -326,8 +326,9 @@ LoadableIcon
   .load.type nullable
 
 // Bug #666798: GIR parser should detect delegate types which throw errors
-DBusInterfaceGetPropertyFunc skip
-DBusInterfaceSetPropertyFunc skip
+// Issue #728: Support non-default error parameter position
+DBusInterfaceGetPropertyFunc.error out unowned=false
+DBusInterfaceSetPropertyFunc.error out unowned=false
 
 // Bug #666799: symbols with moved-to annotations should be deprecated at the old locations
 app_info*#function skip