diff options
author | Jürg Billeter <j@bitron.ch> | 2010-10-11 12:17:23 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-10-11 12:17:23 +0200 |
commit | e823dd0468a470b25397c060bd3eb819f85957ef (patch) | |
tree | 7b85f314dfa091442a834d7dfd444c1c2e2831d6 /src | |
parent | 9adde36bdacffb320e09205e5cf2aff672e79d94 (diff) | |
download | tracker-e823dd0468a470b25397c060bd3eb819f85957ef.tar.gz |
SPARQL: Fix build with Vala < 0.11
Diffstat (limited to 'src')
-rw-r--r-- | src/libtracker-data/tracker-sparql-query.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala index 4afb9390d..462f57522 100644 --- a/src/libtracker-data/tracker-sparql-query.vala +++ b/src/libtracker-data/tracker-sparql-query.vala @@ -89,6 +89,9 @@ namespace Tracker.Sparql { return "\"%s:%s\"".printf (sql_identifier, suffix); } +#if VALA_0_12 + // GLib.HashFunc and GLib.EqualFunc are generic delegates in Vala 0.11.0 and later + public static bool equal (Variable a, Variable b) { return a.index == b.index; } @@ -96,6 +99,15 @@ namespace Tracker.Sparql { public static uint hash (Variable variable) { return (uint) variable.index; } +#else + public static bool equal (void* a, void* b) { + return ((Variable) a).index == ((Variable) b).index; + } + + public static uint hash (void* variable) { + return (uint) ((Variable) variable).index; + } +#endif } class Context { |