]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add to_string() for GLib.PollFd and GLib.Pid
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 5 Dec 2019 17:03:13 +0000 (18:03 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 6 Dec 2019 08:29:08 +0000 (09:29 +0100)
vapi/glib-2.0.vapi

index 7e55b7bbd7d493f48e3794de2030aaee7b820110..6453ee84142216caa27ad2682cb7576e176b40e1 100644 (file)
@@ -1952,6 +1952,9 @@ namespace GLib {
                [CCode (cname = "G_PID_FORMAT")]
                [Version (since = "2.50")]
                public const string FORMAT;
+
+               [CCode (cname = "g_strdup_printf", instance_pos = -1)]
+               public string to_string (string format = "%" + FORMAT);
        }
 
        public delegate void ChildWatchFunc (Pid pid, int status);
@@ -1973,6 +1976,12 @@ namespace GLib {
                public int fd;
                public IOCondition events;
                public IOCondition revents;
+
+               [CCode (cname = "G_POLLFD_FORMAT")]
+               public const string FORMAT;
+
+               [CCode (cname = "g_strdup_printf", instance_pos = -1)]
+               public string to_string (string format = "%" + FORMAT);
        }
 
        [Compact]