]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Ensure that cname of guessed accessor methods is correct
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 3 Jun 2011 09:07:19 +0000 (11:07 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 3 Jun 2011 09:16:09 +0000 (11:16 +0200)
vala/valagirparser.vala

index 60b2342db533046121fdcca2a9122b94db6dd505..383bbdd06f9592cd33af8cfb7349e72f30abbd03 100644 (file)
@@ -718,7 +718,13 @@ public class Vala.GirParser : CodeVisitor {
                                                }
                                        }
                                        var getter = parent.lookup ("get_%s".printf (name));
+                                       if (getter != null && getter.get_cname () != parent.get_lower_case_cprefix() + "get_" + name) {
+                                               getter = null;
+                                       }
                                        var setter = parent.lookup ("set_%s".printf (name));
+                                       if (setter != null && setter.get_cname () != parent.get_lower_case_cprefix() + "set_" + name) {
+                                               setter = null;
+                                       }
                                        var prop = (Property) symbol;
                                        if (prop.no_accessor_method) {
                                                // property getter and setter must both match, otherwise it's NoAccessorMethod