[tracker/direct-access: 72/85] libtracker-bus: Fix string retrieval in ArrayCursor
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 72/85] libtracker-bus: Fix string retrieval in ArrayCursor
- Date: Tue, 20 Jul 2010 14:10:40 +0000 (UTC)
commit 8dc52c914d70e2aefa6dec90c3517d557a795617
Author: Jürg Billeter <j bitron ch>
Date: Mon Jul 19 16:42:04 2010 +0200
libtracker-bus: Fix string retrieval in ArrayCursor
src/libtracker-bus/tracker-array-cursor.vala | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-array-cursor.vala b/src/libtracker-bus/tracker-array-cursor.vala
index 99abf86..25ab5fd 100644
--- a/src/libtracker-bus/tracker-array-cursor.vala
+++ b/src/libtracker-bus/tracker-array-cursor.vala
@@ -20,28 +20,22 @@
internal class Tracker.Bus.ArrayCursor : Tracker.Sparql.Cursor {
int rows;
int current_row = -1;
- char **results;
+ string[,] results;
int cols;
- public ArrayCursor (owned char** results, int rows, int cols) {
+ public ArrayCursor (owned string[,] results, int rows, int cols) {
this.rows = rows;
this.cols = cols;
- this.results = results;
+ this.results = (owned) results;
}
public override int n_columns { get { return cols; } }
public override unowned string? get_string (int column, out long length = null)
requires (current_row >= 0) {
- char **row;
unowned string str;
- if (rows < 1) {
- return null;
- }
-
- row = results + current_row;
- str = (string) row[column];
+ str = results[current_row, column];
if (&length != null) {
length = str.length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]