From a59d540b293051cef07a59bc9c92e79435c78eaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Thu, 17 Sep 2009 16:49:55 +0200 Subject: [PATCH] glib-2.0: Support owned delegates with Idle.add --- vala/valaformalparameter.vala | 3 +++ vapi/glib-2.0.vapi | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vala/valaformalparameter.vala b/vala/valaformalparameter.vala index 3a35aebcc..b9dd31a69 100644 --- a/vala/valaformalparameter.vala +++ b/vala/valaformalparameter.vala @@ -162,6 +162,9 @@ public class Vala.FormalParameter : Symbol { if (a.has_argument ("type")) { ctype = a.get_string ("type"); } + if (a.has_argument ("pos")) { + cparameter_position = a.get_double ("pos"); + } if (a.has_argument ("array_length")) { no_array_length = !a.get_bool ("array_length"); } diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index a06c271c5..7133e2199 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1263,7 +1263,8 @@ namespace GLib { } namespace Idle { - public static uint add (SourceFunc function); + [CCode (cname = "g_idle_add_full")] + public static uint add (owned SourceFunc function, [CCode (pos = 0.1)] int priority = 0); public static uint add_full (int priority, owned SourceFunc function); public static bool remove_by_data (void* data); } -- 2.47.3