[vala] GIR parser: Always add the cname attribute to generated methods
- From: Adrien Bustany <abustany src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] GIR parser: Always add the cname attribute to generated methods
- Date: Thu, 11 Feb 2010 21:40:33 +0000 (UTC)
commit 22e30390cfe79a7cc904d8a1e5e8fa5148a25ef7
Author: Adrien Bustany <abustany gnome org>
Date: Thu Feb 11 14:42:00 2010 -0300
GIR parser: Always add the cname attribute to generated methods
vala/valagirparser.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 697105b..11a58c2 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]