[tracker/gdbus: 6/21] libtracker-data: Do not use deprecated Vala string API
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gdbus: 6/21] libtracker-data: Do not use deprecated Vala string API
- Date: Wed, 27 Oct 2010 17:03:40 +0000 (UTC)
commit b6b31f43e6a5696abe7f82465d7a9a7597637877
Author: Jürg Billeter <j bitron ch>
Date: Mon Oct 25 10:32:55 2010 +0200
libtracker-data: Do not use deprecated Vala string API
src/libtracker-data/tracker-sparql-expression.vala | 2 +-
src/libtracker-data/tracker-sparql-query.vala | 4 ++--
src/libtracker-data/tracker-sparql-scanner.vala | 8 ++++----
src/libtracker-data/tracker-turtle-reader.vala | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index ce4103b..ee015c8 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -734,7 +734,7 @@ class Tracker.Sparql.Expression : Object {
string s = get_last_string (1);
string* p = s;
- string* end = p + s.size ();
+ string* end = p + s.length;
while ((long) p < (long) end) {
string* q = Posix.strchr (p, '\\');
if (q == null) {
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 462f575..579ae3b 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -387,7 +387,7 @@ public class Tracker.Sparql.Query : Object {
void prepare_execute () throws DBInterfaceError, Sparql.Error, DateError {
assert (!update_extensions);
- scanner = new SparqlScanner ((char*) query_string, (long) query_string.size ());
+ scanner = new SparqlScanner ((char*) query_string, (long) query_string.length);
next ();
// declare fn prefix for XPath functions
@@ -452,7 +452,7 @@ public class Tracker.Sparql.Query : Object {
public PtrArray? execute_update (bool blank) throws DBInterfaceError, Sparql.Error, DateError {
assert (update_extensions);
- scanner = new SparqlScanner ((char*) query_string, (long) query_string.size ());
+ scanner = new SparqlScanner ((char*) query_string, (long) query_string.length);
next ();
// declare fn prefix for XPath functions
diff --git a/src/libtracker-data/tracker-sparql-scanner.vala b/src/libtracker-data/tracker-sparql-scanner.vala
index 5d592d4..f8791e9 100644
--- a/src/libtracker-data/tracker-sparql-scanner.vala
+++ b/src/libtracker-data/tracker-sparql-scanner.vala
@@ -514,12 +514,12 @@ public class Tracker.SparqlScanner : Object {
case '@':
type = SparqlTokenType.NONE;
current++;
- if (current < end - "prefix".size () && matches (current, "PREFIX")) {
+ if (current < end - "prefix".length && matches (current, "PREFIX")) {
type = SparqlTokenType.ATPREFIX;
- current += "prefix".size ();
- } else if (current < end - "base".size () && matches (current, "BASE")) {
+ current += "prefix".length;
+ } else if (current < end - "base".length && matches (current, "BASE")) {
type = SparqlTokenType.ATBASE;
- current += "base".size ();
+ current += "base".length;
}
break;
case '|':
diff --git a/src/libtracker-data/tracker-turtle-reader.vala b/src/libtracker-data/tracker-turtle-reader.vala
index 2cf44be..3f3aadf 100644
--- a/src/libtracker-data/tracker-turtle-reader.vala
+++ b/src/libtracker-data/tracker-turtle-reader.vala
@@ -261,7 +261,7 @@ public class Tracker.TurtleReader : Object {
string s = get_last_string (1);
string* p = s;
- string* end = p + s.size ();
+ string* end = p + s.length;
while ((long) p < (long) end) {
string* q = Posix.strchr (p, '\\');
if (q == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]