]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Set lvalue_access to false for va_list
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 15 Jul 2011 16:24:15 +0000 (18:24 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 15 Jul 2011 16:53:26 +0000 (18:53 +0200)
Fixes bug 654646.

tests/Makefile.am
tests/structs/bug654646.vala [new file with mode: 0644]
vapi/glib-2.0.vapi

index 02911887f7345fbed3ca7970663c22d24d0a4cbe..f77549bf43494756f31fc7ab81aaf77101fdfa86 100644 (file)
@@ -67,6 +67,7 @@ TESTS = \
        structs/bug622422.vala \
        structs/bug623092.vala \
        structs/bug651441.vala \
+       structs/bug654646.vala \
        delegates/delegates.vala \
        delegates/bug539166.vala \
        delegates/bug595610.vala \
diff --git a/tests/structs/bug654646.vala b/tests/structs/bug654646.vala
new file mode 100644 (file)
index 0000000..3a65974
--- /dev/null
@@ -0,0 +1,10 @@
+void foo (int i, ...) {
+       va_list v = va_list ();
+       bar (v);
+}
+
+void bar (va_list v) {
+}
+
+void main () {
+}
index 8ce2417b82b6822a75987b2095f95417c5fb1e1c..34de1a45a85431bfb74e1dda56d82ea6fb7a7afd 100644 (file)
@@ -793,7 +793,7 @@ public struct time_t {
 }
 
 [SimpleType]
-[CCode (cheader_filename="stdarg.h", cprefix="va_", has_type_id = false, destroy_function = "va_end")]
+[CCode (cheader_filename="stdarg.h", cprefix="va_", has_type_id = false, destroy_function = "va_end", lvalue_access = false)]
 public struct va_list {
        [CCode (cname = "va_start")]
        public va_list ();