]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gobject-2.0: Fix the Closure.invoke() signature
authorOle André Vadla Ravnås <oleavr@gmail.com>
Thu, 8 Jul 2021 23:59:07 +0000 (01:59 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 16 Aug 2021 10:17:29 +0000 (12:17 +0200)
The return value must be initialized by the caller, as is clear from
GLib's internal callers, and e.g. dummy_closure_marshal() on the callee
side. So it appears the GLib type annotation is incorrect, as it
specifies `out` but should be `inout`.

vapi/gobject-2.0.vapi

index 53f63af1ed94f8cb89b7d3b745bbe4ac40b30cf3..e8399ad71702a09f45c2d80b9b8d3e8c6904c637 100644 (file)
@@ -87,7 +87,7 @@ namespace GLib {
                public void add_invalidate_notifier (void* notify_data, GLib.ClosureNotify notify_func);
                public void add_marshal_guards (void* pre_marshal_data, GLib.ClosureNotify pre_marshal_notify, void* post_marshal_data, GLib.ClosureNotify post_marshal_notify);
                public void invalidate ();
-               public void invoke (out GLib.Value return_value, [CCode (array_length_cname = "n_param_values", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] param_values, void* invocation_hint);
+               public void invoke (ref GLib.Value return_value, [CCode (array_length_cname = "n_param_values", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] param_values, void* invocation_hint = null);
                [CCode (has_construct_function = false)]
                public Closure.object (uint sizeof_closure, GLib.Object object);
                public unowned GLib.Closure @ref ();