diff options
author | Jürg Billeter <j@bitron.ch> | 2010-10-11 15:35:07 +0200 |
---|---|---|
committer | Martyn Russell <martyn@lanedo.com> | 2010-10-14 16:43:33 +0100 |
commit | c8edcf3e74470660ca3dfc5757f65dfb587eb9cd (patch) | |
tree | ab8a4b6d88e9bed5f6f65f1dafa4b58647ebd305 | |
parent | ea640fff349774821eba9fb0452171d43a10f9ce (diff) | |
download | tracker-c8edcf3e74470660ca3dfc5757f65dfb587eb9cd.tar.gz |
libtracker-bus: Fix build with Vala < 0.11
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | src/libtracker-bus/tracker-bus.vala | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh index c04cf49fd..4e919ac2e 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 3f1f9f454..60081341c 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); } |