]> git.notmuchmail.org Git - notmuch/blobdiff - lib/database.cc
lib: Eliminate some redundant includes of xapian.h
[notmuch] / lib / database.cc
index 6affc205e4e81b894443722b30f54457ff7669e3..82c078867a52dee07a61dbaf6bea77044d578398 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <sys/time.h>
 #include <signal.h>
-#include <xapian.h>
 
 #include <glib.h> /* g_free, GPtrArray, GHashTable */
 
@@ -185,7 +184,7 @@ typedef struct {
  * nearly universal to all mail messages).
  */
 
-prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
+static prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "type",                  "T" },
     { "reference",             "XREFERENCE" },
     { "replyto",               "XREPLYTO" },
@@ -194,14 +193,14 @@ prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "directory-direntry",    "XDDIRENTRY" },
 };
 
-prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
+static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
     { "thread",                        "G" },
     { "tag",                   "K" },
     { "is",                    "K" },
     { "id",                    "Q" }
 };
 
-prefix_t PROBABILISTIC_PREFIX[]= {
+static prefix_t PROBABILISTIC_PREFIX[]= {
     { "from",                  "XFROM" },
     { "to",                    "XTO" },
     { "attachment",            "XATTACHMENT" },
@@ -1300,7 +1299,7 @@ _resolve_message_id_to_thread_id (notmuch_database_t *notmuch,
 
     talloc_free (metadata_key);
 
-    return thread_id;
+    return talloc_strdup (ctx, thread_id);
 }
 
 static notmuch_status_t