Commit c654b73a authored by Rico Tzschichholz's avatar Rico Tzschichholz

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 GNOME/vala#630
parent c4c1b7be
......@@ -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")]
......
......@@ -12,16 +12,12 @@ namespace GLib {
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;
}
[Compact]
......@@ -180,13 +176,7 @@ namespace GLib {
public virtual GLib.Icon? from_tokens (string[] tokens, int version) throws GLib.Error;
}
[CCode (has_target = false)]
public delegate void SimpleActionActivateFunc (SimpleAction action, Variant? parameter, void* user_data);
[CCode (has_target = false)]
public delegate void SimpleActionChangeStateFunc (SimpleAction action, Variant value, void* user_data);
[Version (deprecated_since = "vala-0.26", replacement = "SimplActionActivateFunc")]
public delegate void SimpleActionActivateCallback (SimpleAction action, Variant? parameter);
[Version (deprecated_since = "vala-0.26", replacement = "SimplActionChangeStateFunc")]
public delegate void SimpleActionChangeStateCallback (SimpleAction action, Variant value);
[CCode (cheader_filename = "gio/gio.h", cname = "GAsyncReadyCallback", instance_pos = 2.9)]
public delegate void TaskReadyCallback (GLib.Object? source_object, GLib.Task task);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment