[vala/0.10-gir] girparser: Update to prefix handling used in GIR version 1.2
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10-gir] girparser: Update to prefix handling used in GIR version 1.2
- Date: Mon, 13 Sep 2010 20:08:39 +0000 (UTC)
commit e8c25934647194707e8701213ef125f30b0832b8
Author: Jürg Billeter <j bitron ch>
Date: Mon Sep 13 22:05:21 2010 +0200
girparser: Update to prefix handling used in GIR version 1.2
vala/valagirparser.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index f213b4d..5bb2d73 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -208,7 +208,7 @@ public class Vala.GirParser : CodeVisitor {
}
}
- string? cprefix = reader.get_attribute ("c:prefix");
+ string? cprefix = reader.get_attribute ("c:identifier-prefixes");
if (cprefix != null) {
ns.add_cprefix (cprefix);
ns.set_lower_case_cprefix (Symbol.camel_case_to_lower_case (cprefix) + "_");
@@ -1044,6 +1044,7 @@ public class Vala.GirParser : CodeVisitor {
start_element ("constructor");
string name = reader.get_attribute ("name");
string throws_string = reader.get_attribute ("throws");
+ string cname = reader.get_attribute ("c:identifier");
next ();
string? ctype;
@@ -1060,6 +1061,9 @@ public class Vala.GirParser : CodeVisitor {
} else if (m.name.has_prefix ("new_")) {
m.name = m.name.offset ("new_".length);
}
+ if (cname != null) {
+ m.set_cname (cname);
+ }
if (current_token == MarkupTokenType.START_ELEMENT && reader.name == "parameters") {
start_element ("parameters");
next ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]