[tracker/tracker-1.2] Make --disable-tracker-fts compile again
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.2] Make --disable-tracker-fts compile again
- Date: Wed, 10 Dec 2014 11:28:51 +0000 (UTC)
commit 893f46073cd28c6867f73a904bd8ee1eda0d01ae
Author: Philip Van Hoof <philip codeminded be>
Date: Sun Nov 30 23:16:59 2014 +0100
Make --disable-tracker-fts compile again
src/libtracker-data/tracker-data-manager.c | 4 ++--
src/libtracker-data/tracker-db-interface-sqlite.c | 12 ++++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 03cb80b..f4f62b2 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3644,7 +3644,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_data_update_init ();
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
if (!tracker_fts_init ()) {
g_warning ("FTS module initialization failed");
}
@@ -4615,7 +4615,7 @@ tracker_data_manager_shutdown (void)
tracker_locale_shutdown ();
}
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
if (!tracker_fts_shutdown ()) {
g_warning ("FTS module shutdown failed");
}
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 12903bf..db445e2 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -31,7 +31,7 @@
#include <libtracker-sparql/tracker-sparql.h>
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
#include <libtracker-fts/tracker-fts.h>
#include <libtracker-fts/tracker-parser.h>
#endif
@@ -682,8 +682,10 @@ function_sparql_unaccent (sqlite3_context *context,
zOutput = u8_normalize (UNINORM_NFKD, zInput, nInput, NULL, &written);
+#if HAVE_TRACKER_FTS
/* Unaccenting is done in place */
tracker_parser_unaccent_nfkd_string (zOutput, &written);
+#endif
sqlite3_result_text (context, zOutput, written, free);
}
@@ -873,8 +875,10 @@ function_sparql_unaccent (sqlite3_context *context,
return;
}
+#if HAVE_TRACKER_FTS
/* Unaccenting is done in place */
tracker_parser_unaccent_nfkd_string (zOutput, &nOutput);
+#endif
sqlite3_result_text16 (context, zOutput, -1, sqlite3_free);
}
@@ -1150,7 +1154,7 @@ tracker_db_interface_sqlite_fts_init (TrackerDBInterface *db_interface,
GHashTable *multivalued,
gboolean create)
{
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
GStrv fts_columns;
tracker_fts_init_db (db_interface->db, properties);
@@ -1190,7 +1194,7 @@ tracker_db_interface_sqlite_fts_init (TrackerDBInterface *db_interface,
#endif
}
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
void
tracker_db_interface_sqlite_fts_alter_table (TrackerDBInterface *db_interface,
@@ -1348,7 +1352,7 @@ tracker_db_interface_sqlite_finalize (GObject *object)
db_interface = TRACKER_DB_INTERFACE (object);
-#ifdef HAVE_TRACKER_FTS
+#if HAVE_TRACKER_FTS
tracker_fts_shutdown_db (db_interface->db);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]