]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GIR parser: Always add the cname attribute to generated methods
authorAdrien Bustany <abustany@gnome.org>
Thu, 11 Feb 2010 17:42:00 +0000 (14:42 -0300)
committerAdrien Bustany <abustany@gnome.org>
Thu, 11 Feb 2010 21:40:25 +0000 (18:40 -0300)
vala/valagirparser.vala

index 697105bd7e319e4dd43e24ef48ee066dd7806103..11a58c2ba50d26e6cb1bf019972f0e22e0cd2845 100644 (file)
@@ -867,6 +867,7 @@ public class Vala.GirParser : CodeVisitor {
        Method parse_method (string element_name) {
                start_element (element_name);
                string name = reader.get_attribute ("name");
+               string cname = reader.get_attribute ("c:identifier");
                string throws_string = reader.get_attribute ("throws");
                string invoker = reader.get_attribute ("invoker");
                next ();
@@ -878,6 +879,9 @@ public class Vala.GirParser : CodeVisitor {
                }
                var m = new Method (name, return_type, get_current_src ());
                m.access = SymbolAccessibility.PUBLIC;
+               if (cname != null) {
+                       m.set_cname (cname);
+               }
 
                if (element_name == "virtual-method" || element_name == "callback") {
                        m.is_virtual = true;