[tracker] libtracker-common: Check when retrieving SPARQL builder result
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-common: Check when retrieving SPARQL builder result
- Date: Tue, 17 Nov 2009 12:56:24 +0000 (UTC)
commit 287ef6553b2a53d4e94f2424a180b6e434304b91
Author: Jürg Billeter <j bitron ch>
Date: Tue Nov 17 13:50:55 2009 +0100
libtracker-common: Check when retrieving SPARQL builder result
Warn when retrieving SPARQL builder result in wrong state as, for
example, with a missing insert_close call.
src/libtracker-common/tracker-sparql-builder.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-common/tracker-sparql-builder.vala b/src/libtracker-common/tracker-sparql-builder.vala
index 09ef643..7c8761d 100644
--- a/src/libtracker-common/tracker-sparql-builder.vala
+++ b/src/libtracker-common/tracker-sparql-builder.vala
@@ -29,7 +29,10 @@ public class Tracker.SparqlBuilder : Object {
}
public string result {
- get { return str.str; }
+ get {
+ warn_if_fail (states.length == 1);
+ return str.str;
+ }
}
public int length { get; private set; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]