[vala] girparser: Ensure that cname of guessed accessor methods is correct
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Ensure that cname of guessed accessor methods is correct
- Date: Fri, 3 Jun 2011 09:24:57 +0000 (UTC)
commit b57c0e5e2e19caccdc6292bc62a7757854c8af7b
Author: Luca Bruno <lucabru src gnome org>
Date: Fri Jun 3 11:07:19 2011 +0200
girparser: Ensure that cname of guessed accessor methods is correct
vala/valagirparser.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 60b2342..383bbdd 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]