]> git.notmuchmail.org Git - notmuch/blobdiff - lib/notmuch-private.h
lib: add a log function with output to a string in notmuch_database_t
[notmuch] / lib / notmuch-private.h
index 02a8fc62b6319eaa34d300cb4214d92731a5ec9e..7cb6fd49d890bf9b5f718c4bf36a9e32bdc0aad2 100644 (file)
@@ -65,7 +65,7 @@ NOTMUCH_BEGIN_DECLS
 
 /* Robust bit test/set/reset macros */
 #define _NOTMUCH_VALID_BIT(bit) \
-    ((bit) >= 0 && (bit) < CHAR_BIT * sizeof (unsigned long long))
+    ((bit) >= 0 && ((unsigned long) bit) < CHAR_BIT * sizeof (unsigned long long))
 #define NOTMUCH_TEST_BIT(val, bit) \
     (_NOTMUCH_VALID_BIT(bit) ? !!((val) & (1ull << (bit))) : 0)
 #define NOTMUCH_SET_BIT(valp, bit) \
@@ -190,6 +190,10 @@ _notmuch_message_id_compressed (void *ctx, const char *message_id);
 notmuch_status_t
 _notmuch_database_ensure_writable (notmuch_database_t *notmuch);
 
+void
+_notmuch_database_log (notmuch_database_t *notmuch,
+                      const char *format, ...);
+
 const char *
 _notmuch_database_relative_path (notmuch_database_t *notmuch,
                                 const char *path);