From c654b73a43f43506905be501200e4c3c07f77b91 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Wed, 30 May 2018 12:50:30 +0200 Subject: gio-2.0: Apply delegate_target = false on ActionEntry callbacks and make them weak They break struct ABI and the "require_copy/destroy" check in codegen while being defined with target. Fixes https://gitlab.gnome.org/GNOME/vala/issues/630 --- vapi/gio-2.0.vapi | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'vapi/gio-2.0.vapi') diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index b430da7cc..8b738b51b 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -3839,16 +3839,12 @@ namespace GLib { [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] public struct ActionEntry { public weak string name; - [Version (deprecated = true, deprecated_since = "vala-0.26", replacement = "activate_callback")] - public GLib.SimpleActionActivateCallback? activate; + [CCode (delegate_target = false)] + public weak GLib.SimpleActionActivateCallback? activate; public weak string parameter_type; public weak string state; - [Version (deprecated_since = "vala-0.26", replacement = "change_state_callback")] - public GLib.SimpleActionChangeStateCallback? change_state; - [CCode (cname = "activate")] - public GLib.SimpleActionActivateFunc activate_callback; - [CCode (cname = "change_state")] - public GLib.SimpleActionChangeStateFunc? change_state_callback; + [CCode (delegate_target = false)] + public weak GLib.SimpleActionChangeStateCallback? change_state; } [CCode (cheader_filename = "gio/gio.h", has_type_id = false)] [Version (since = "2.26")] @@ -4733,16 +4729,10 @@ namespace GLib { [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] public delegate bool SettingsGetMapping (GLib.Variant value, out void* result); [CCode (cheader_filename = "gio/gio.h")] - [Version (deprecated_since = "vala-0.26", replacement = "SimplActionActivateFunc")] public delegate void SimpleActionActivateCallback (GLib.SimpleAction action, GLib.Variant? parameter); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] - public delegate void SimpleActionActivateFunc (GLib.SimpleAction action, GLib.Variant? parameter, void* user_data); [CCode (cheader_filename = "gio/gio.h")] - [Version (deprecated_since = "vala-0.26", replacement = "SimplActionChangeStateFunc")] public delegate void SimpleActionChangeStateCallback (GLib.SimpleAction action, GLib.Variant value); [CCode (cheader_filename = "gio/gio.h", has_target = false)] - public delegate void SimpleActionChangeStateFunc (GLib.SimpleAction action, GLib.Variant value, void* user_data); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable? cancellable = null); [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] [Version (since = "2.22")] -- cgit v1.2.1