[vala/wip/attributes: 53/100] gidlparser: Drop usage add_cprefix and set_lower_case_cprefix
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 53/100] gidlparser: Drop usage add_cprefix and set_lower_case_cprefix
- Date: Sat, 2 Jul 2011 12:29:45 +0000 (UTC)
commit 854c86cacba74f9679e4e45e6be492c114b10d76
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Jun 29 15:38:20 2011 +0200
gidlparser: Drop usage add_cprefix and set_lower_case_cprefix
vapigen/valagidlparser.vala | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index cc433ef..6e1d6c9 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -435,7 +435,7 @@ public class Vala.GIdlParser : CodeVisitor {
cc = cp.scope.lookup (tok) as Symbol;
if ( cc == null ) {
cc = new Namespace (tok, current_source_reference);
- ((Namespace) cc).add_cprefix (get_cprefix (cp) + tok);
+ cc.set_attribute_string ("CCode", "cprefix", get_cprefix (cp), + tok);
add_symbol_to_container (cp, cc);
}
cp = cc;
@@ -466,12 +466,9 @@ public class Vala.GIdlParser : CodeVisitor {
if (nv[0] == "cheader_filename") {
ns.set_attribute_string ("CCode", "cheader_filename", eval (nv[1]));
} else if (nv[0] == "cprefix") {
- var cprefixes = eval (nv[1]).split (",");
- foreach(string name in cprefixes) {
- ns.add_cprefix (name);
- }
+ ns.set_attribute_string ("CCode", "cprefix", eval (nv[1]));
} else if (nv[0] == "lower_case_cprefix") {
- ns.set_lower_case_cprefix (eval (nv[1]));
+ ns.set_attribute_string ("CCode", "lower_case_cprefix", eval (nv[1]));
} else if (nv[0] == "gir_namespace") {
ns.source_reference.file.gir_namespace = eval (nv[1]);
} else if (nv[0] == "gir_version") {
@@ -1369,7 +1366,7 @@ public class Vala.GIdlParser : CodeVisitor {
}
}
- en.set_cprefix (common_prefix);
+ en.set_attribute_string ("CCode", "cprefix", common_prefix);
foreach (weak IdlNode value2 in en_node.values) {
var val_attributes = get_attributes (value2.name);
@@ -1392,7 +1389,7 @@ public class Vala.GIdlParser : CodeVisitor {
if (is_errordomain) {
var ed = new ErrorDomain (en.name, current_source_reference);
ed.access = SymbolAccessibility.PUBLIC;
- ed.set_cprefix (common_prefix);
+ ed.set_attribute_string ("CCode", "cprefix", common_prefix);
if (cheader_filename != null) {
ed.set_attribute_string ("CCode", "cheader_filename", cheader_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]