From: Adrien Bustany Date: Thu, 11 Feb 2010 17:42:00 +0000 (-0300) Subject: GIR parser: Always add the cname attribute to generated methods X-Git-Tag: 0.8.0~282 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=22e30390cfe79a7cc904d8a1e5e8fa5148a25ef7;p=thirdparty%2Fvala.git GIR parser: Always add the cname attribute to generated methods --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 697105bd7..11a58c2ba 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -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;