[vala] girparser: Fix setting cname for fields of nested structs



commit 1007db87a5149725d2e47e5bf7254956450de44b
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon May 23 23:52:02 2011 +0200

    girparser: Fix setting cname for fields of nested structs
    
    Fixes bug 650768.

 vala/valagirparser.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 87d1dc4..cc97221 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -775,7 +775,9 @@ public class Vala.GirParser : CodeVisitor {
 						foreach (var fn in members) {
 							var f = fn.symbol as Field;
 							if (f != null) {
-								f.set_cname (name + "." + fn.get_cname ());
+								if (f.binding == MemberBinding.INSTANCE) {
+									f.set_cname (name + "." + f.get_cname ());
+								}
 								f.name = symbol.name + "_" + f.name;
 								fn.name = f.name;
 								parent.add_member (fn);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]