[tracker/rss-enclosures] libtracker-bus: Fix string retrieval in ArrayCursor
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-bus: Fix string retrieval in ArrayCursor
- Date: Wed, 24 Nov 2010 01:11:46 +0000 (UTC)
commit 9ada760e88b15b12c4be24262c76619730329fb3
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]