[vala] 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] girparser: Update to prefix handling used in GIR version 1.2
- Date: Wed, 15 Sep 2010 21:05:06 +0000 (UTC)
commit dc8d510a875180d4b6647defb4b45620293cf2a2
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 13c0213..94934bd 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) + "_");
@@ -1043,6 +1043,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;
@@ -1059,6 +1060,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]