[tracker/miner-fs-multi-insert: 15/17] libtracker-bus: Fix build with Vala < 0.11
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-multi-insert: 15/17] libtracker-bus: Fix build with Vala < 0.11
- Date: Thu, 14 Oct 2010 14:02:34 +0000 (UTC)
commit f4c956f2da882692eb6ae252f880e6d4908729f1
Author: Jürg Billeter <j bitron ch>
Date: Mon Oct 11 15:35:07 2010 +0200
libtracker-bus: Fix build with Vala < 0.11
autogen.sh | 2 +-
src/libtracker-bus/tracker-bus.vala | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index c04cf49..4e919ac 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=.
PKG_NAME="tracker"
REQUIRED_AUTOMAKE_VERSION=1.11
-REQUIRED_VALA_VERSION=0.11.0
+REQUIRED_VALA_VERSION=0.9.5
(test -f $srcdir/configure.ac \
&& test -f $srcdir/README) || {
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index 3f1f9f4..6008134 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -109,11 +109,14 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
public async override GLib.PtrArray? update_array_async (string[] sparql, int priority = GLib.Priority.DEFAULT, Cancellable? cancellable = null) throws Sparql.Error, IOError {
try {
+ // helper variable necessary to work around bug in vala < 0.11
+ PtrArray result;
if (priority >= GLib.Priority.DEFAULT) {
- return yield tracker_bus_fd_sparql_update_array_async (connection, sparql, cancellable);
+ result = yield tracker_bus_fd_sparql_update_array_async (connection, sparql, cancellable);
} else {
- return yield tracker_bus_fd_sparql_batch_update_array_async (connection, sparql, cancellable);
+ result = yield tracker_bus_fd_sparql_batch_update_array_async (connection, sparql, cancellable);
}
+ return result;
} catch (DBus.Error e) {
throw new Sparql.Error.INTERNAL (e.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]