]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Mark va_list.arg() with simple-generics to allow int64 or double
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 15 Feb 2017 18:48:15 +0000 (19:48 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 15 Feb 2017 18:48:15 +0000 (19:48 +0100)
tests/methods/bug620673.vala
vapi/glib-2.0.vapi

index fd6158b09330ee9e48785d076ce778fd41f6aadf..8c373190fb3b5ffcfd55609589d820c4cd8bfa6a 100644 (file)
@@ -2,9 +2,13 @@ void foo (int bar, ...) throws Error {
        assert (bar == 42);
        var args = va_list ();
        int arg = args.arg ();
+       int64 arg2 = args.arg ();
+       double arg3 = args.arg ();
        assert (arg == 23);
+       assert (arg2 == 4711LL);
+       assert (arg3 == 3.1415);
 }
 
 void main () {
-       foo (42, 23);
+       foo (42, 23, 4711LL, 3.1415);
 }
index 02c18ebf680debf301d9f5cae45d9d026bb93bc3..cbf177f3a61263f4873ba773325e7004b6561141 100644 (file)
@@ -895,7 +895,7 @@ public struct va_list {
        public va_list ();
        [CCode (cname = "va_copy")]
        public va_list.copy (va_list src);
-       [CCode (generic_type_pos = 1.1)]
+       [CCode (generic_type_pos = 1.1, simple_generics = true)]
        public unowned G arg<G> ();
 }