]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Drop the parameter before the ellipsis having first_ prefix
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 14 May 2011 17:47:59 +0000 (19:47 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Sat, 14 May 2011 17:48:12 +0000 (19:48 +0200)
vala/valagirparser.vala

index 21b2546ce8e0865986b95766e5cb4fda55016bbb..d29851ff72bb09da39dc1d941d2b12451c3166f6 100644 (file)
@@ -2790,6 +2790,15 @@ public class Vala.GirParser : CodeVisitor {
                                }
                        }
                }
+               if (parameters.size > 1) {
+                       ParameterInfo last_param = parameters[parameters.size-1];
+                       if (last_param.param.ellipsis) {
+                               var first_vararg_param = parameters[parameters.size-2];
+                               if (first_vararg_param.param.name.has_prefix ("first_")) {
+                                       first_vararg_param.keep = false;
+                               }
+                       }
+               }
 
                int i = 0, j=1;