From: Rico Tzschichholz Date: Wed, 15 Feb 2017 18:48:15 +0000 (+0100) Subject: glib-2.0: Mark va_list.arg() with simple-generics to allow int64 or double X-Git-Tag: 0.35.6~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce93033cbc6aefef27dcad638c0176089f10b20d;p=thirdparty%2Fvala.git glib-2.0: Mark va_list.arg() with simple-generics to allow int64 or double --- diff --git a/tests/methods/bug620673.vala b/tests/methods/bug620673.vala index fd6158b09..8c373190f 100644 --- a/tests/methods/bug620673.vala +++ b/tests/methods/bug620673.vala @@ -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); } diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 02c18ebf6..cbf177f3a 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -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 (); }