]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Support delegates with target
authorJürg Billeter <j@bitron.ch>
Tue, 29 Jun 2010 19:22:01 +0000 (21:22 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 29 Jun 2010 19:22:58 +0000 (21:22 +0200)
Fixes bug 621834.

vala/valagirparser.vala

index 51778999087c7853d703c1e902c9acf95c12e2a1..03c41e7bf97780566dd8017b747f27de53bba6d8 100644 (file)
@@ -953,7 +953,12 @@ public class Vala.GirParser : CodeVisitor {
 
                int last = -1;
                foreach (MethodInfo info in parameters) {
-                       if (info.keep
+                       if (s is Delegate && info.closure_idx == i + add) {
+                               var d = (Delegate) s;
+                               d.has_target = true;
+                               d.cinstance_parameter_position = (float) j - 0.1;
+                               info.keep = false;
+                       } else if (info.keep
                            && !array_length_parameters.contains (i+add)
                            && !closure_parameters.contains (i+add)
                            && !destroy_parameters.contains (i+add)) {