[vala/switch-to-gir: 26/36] girparser: Use string.replace instead of string.joinv
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 26/36] girparser: Use string.replace instead of string.joinv
- Date: Sat, 6 Nov 2010 11:50:33 +0000 (UTC)
commit 05035f6fad0eef18b28583bb29e3c163b9f2706a
Author: Luca Bruno <lucabru src gnome org>
Date: Sun Aug 29 15:46:03 2010 +0200
girparser: Use string.replace instead of string.joinv
vala/valagirparser.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 7c2ca6e..5a82a89 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1481,7 +1481,7 @@ public class Vala.GirParser : CodeVisitor {
EnumValue parse_enumeration_member () {
start_element ("member");
- var ev = new EnumValue (string.joinv ("_", reader.get_attribute ("name").up ().split ("-")), null);
+ var ev = new EnumValue (reader.get_attribute ("name").up ().replace ("-", "_"), null, get_current_src ());
ev.set_cname (reader.get_attribute ("c:identifier"));
next ();
end_element ("member");
@@ -1492,7 +1492,7 @@ public class Vala.GirParser : CodeVisitor {
start_element ("member");
ErrorCode ec;
- string name = string.joinv ("_", reader.get_attribute ("name").up ().split ("-"));
+ string name = reader.get_attribute ("name").up ().replace ("-", "_");
string value = reader.get_attribute ("value");
if (value != null) {
ec = new ErrorCode.with_value (name, new IntegerLiteral (value));
@@ -2016,7 +2016,7 @@ public class Vala.GirParser : CodeVisitor {
Property parse_property () {
start_element ("property");
- string name = string.joinv ("_", reader.get_attribute ("name").split ("-"));
+ string name = reader.get_attribute ("name").replace ("-", "_");
string readable = reader.get_attribute ("readable");
string writable = reader.get_attribute ("writable");
string construct_ = reader.get_attribute ("construct");
@@ -2289,7 +2289,7 @@ public class Vala.GirParser : CodeVisitor {
Signal parse_signal () {
start_element ("glib:signal");
- string name = string.joinv ("_", reader.get_attribute ("name").split ("-"));
+ string name = reader.get_attribute ("name").replace ("-", "_");
next ();
DataType return_type;
if (current_token == MarkupTokenType.START_ELEMENT && reader.name == "return-value") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]