From: Rico Tzschichholz Date: Sat, 2 Aug 2025 21:05:44 +0000 (+0200) Subject: glib-2.0: Only annote specific SourceOnceFunc parameters instead X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38b349753f1b479e6bf1de6648eb0bc30e936acd;p=thirdparty%2Fvala.git glib-2.0: Only annote specific SourceOnceFunc parameters instead Regresssion of 0e39d2dae386e40bf2d7be8d299b3560d8fdb50e Fixes https://gitlab.gnome.org/GNOME/vala/issues/1627 --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 7404b28d6..1f89f6cfa 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -2087,14 +2087,14 @@ namespace GLib { public static uint add (uint interval, owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT); public static uint add_full (int priority, uint interval, owned SourceFunc function); [Version (since = "2.74")] - public static uint add_once (uint interval, owned SourceOnceFunc function); + public static uint add_once (uint interval, [CCode (scope = "async")] owned SourceOnceFunc function); [Version (since = "2.14")] [CCode (cname = "g_timeout_add_seconds_full")] public static uint add_seconds (uint interval, owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT); [Version (since = "2.14")] public static uint add_seconds_full (int priority, uint interval, owned SourceFunc function); [Version (since = "2.78")] - public static uint add_seconds_once (uint interval, owned SourceOnceFunc function); + public static uint add_seconds_once (uint interval, [CCode (scope = "async")] owned SourceOnceFunc function); } [CCode (cname = "GSource")] @@ -2107,7 +2107,7 @@ namespace GLib { public static uint add (owned SourceFunc function, [CCode (pos = 0.1)] int priority = Priority.DEFAULT_IDLE); public static uint add_full (int priority, owned SourceFunc function); [Version (since = "2.74")] - public static uint add_once (owned SourceOnceFunc function); + public static uint add_once ([CCode (scope = "async")] owned SourceOnceFunc function); public static bool remove_by_data (void* data); } @@ -2258,7 +2258,6 @@ namespace GLib { public delegate bool SourceFunc (); [Version (since = "2.74")] - [CCode (scope = "async")] public delegate void SourceOnceFunc (); [CCode (has_type_id = false)]