[vala/switch-to-gir] 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] girparser: Use string.replace instead of string.joinv
- Date: Fri, 27 Aug 2010 15:11:53 +0000 (UTC)
commit 460590cdf59533683fd0cfd35738815d0359623e
Author: Luca Bruno <lethalman88 gmail com>
Date: Fri Aug 27 17:11:30 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 cd8bbf5..7a92985 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1294,7 +1294,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);
ev.set_cname (reader.get_attribute ("c:identifier"));
next ();
end_element ("member");
@@ -1305,7 +1305,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));
@@ -1768,7 +1768,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");
@@ -2040,7 +2040,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]