[tracker] FTS: Initialize glib in module init function



commit fc2837816cc0e1f2b3237b9366e7fd3b70f5434a
Author: Benjamin Otte <otte gnome org>
Date:   Wed Jul 15 12:26:01 2009 +0200

    FTS: Initialize glib in module init function
    
    With these changes, it is possible to use the tracker-fts module in the
    sqlite3 command-line tool.

 src/tracker-fts/tracker-fts.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-fts/tracker-fts.c b/src/tracker-fts/tracker-fts.c
index 5119b7c..3f72cd4 100644
--- a/src/tracker-fts/tracker-fts.c
+++ b/src/tracker-fts/tracker-fts.c
@@ -7803,6 +7803,10 @@ int sqlite3Fts3InitHashTable(sqlite3 *, fts3Hash *, const char *);
 int sqlite3Fts3Init(sqlite3 *db){
   int rc = SQLITE_OK;
 
+  g_type_init ();
+  if (!g_thread_supported ())
+    g_thread_init (NULL);
+
   /* Create the virtual table wrapper around the hash-table and overload
   ** the two scalar functions. If this is successful, register the
   ** module with sqlite.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]