]> git.notmuchmail.org Git - notmuch/blobdiff - message.cc
add_message: Fix to not add multiple documents with the same message ID
[notmuch] / message.cc
index 281da4f55c34388c3ac54a6cea2a7f8707a75e38..ce600af94b1340310aa252cf7a8ee0433aae1929 100644 (file)
@@ -41,6 +41,13 @@ struct _notmuch_thread_ids {
     char *next;
 };
 
+/* "128 bits of thread-id ought to be enough for anybody" */
+#define NOTMUCH_THREAD_ID_BITS  128
+#define NOTMUCH_THREAD_ID_DIGITS (NOTMUCH_THREAD_ID_BITS / 4)
+typedef struct _thread_id {
+    char str[NOTMUCH_THREAD_ID_DIGITS + 1];
+} thread_id_t;
+
 #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))
 
 /* These prefix values are specifically chosen to be compatible