[vala] GIR writer: Generate property's cannonical name instead of name



commit 689b045f6487c3e48c8a997b7216b4c9d05a16d9
Author: Didier 'Ptitjes <ptitjes free fr>
Date:   Sat Mar 21 04:45:12 2009 +0100

    GIR writer: Generate property's cannonical name instead of name
    
    Signed-off-by: Didier 'Ptitjes <ptitjes free fr>
---
 gobject/valagirwriter.vala |    2 +-
 vala/valaproperty.vala     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gobject/valagirwriter.vala b/gobject/valagirwriter.vala
index b7ce3d8..f19031a 100644
--- a/gobject/valagirwriter.vala
+++ b/gobject/valagirwriter.vala
@@ -561,7 +561,7 @@ public class Vala.GIRWriter : CodeVisitor {
 		}
 
 		write_indent ();
-		stream.printf ("<property name=\"%s\"", prop.name);
+		stream.printf ("<property name=\"%s\"", prop.get_canonical_name ());
 		if (prop.get_accessor != null) {
 			stream.printf (" readable=\"1\"");
 		}
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 8d666de..edcd656 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -243,7 +243,7 @@ public class Vala.Property : Member, Lockable {
 		return new CCodeConstant ("\"%s\"".printf (get_canonical_name ()));
 	}
 
-	private string get_canonical_name () {
+	public string get_canonical_name () {
 		var str = new StringBuilder ();
 		
 		string i = name;



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