typedef struct _notmuch_doc_id_set notmuch_doc_id_set_t;
+typedef struct _notmuch_string_list notmuch_string_list_t;
+
/* database.cc */
/* Lookup a prefix value by name.
notmuch_database_t *notmuch,
unsigned int seed_doc_id,
notmuch_doc_id_set_t *match_set,
+ notmuch_string_list_t *excluded_terms,
notmuch_sort_t sort);
/* message.cc */
*/
struct visible _notmuch_messages {
notmuch_bool_t is_of_list_type;
+ notmuch_doc_id_set_t *excluded_doc_ids;
notmuch_message_node_t *iterator;
};
struct _notmuch_string_node *next;
} notmuch_string_node_t;
-typedef struct _notmuch_string_list {
+struct visible _notmuch_string_list {
int length;
notmuch_string_node_t *head;
notmuch_string_node_t **tail;
-} notmuch_string_list_t;
+};
notmuch_string_list_t *
_notmuch_string_list_create (const void *ctx);
_notmuch_filenames_create (const void *ctx,
notmuch_string_list_t *list);
-#pragma GCC visibility pop
-
NOTMUCH_END_DECLS
+#ifdef __cplusplus
+/* Implicit typecast from 'void *' to 'T *' is okay in C, but not in
+ * C++. In talloc_steal, an explicit cast is provided for type safety
+ * in some GCC versions. Otherwise, a cast is required. Provide a
+ * template function for this to maintain type safety, and redefine
+ * talloc_steal to use it.
+ */
+#if !(__GNUC__ >= 3)
+template <class T> T *
+_notmuch_talloc_steal (const void *new_ctx, const T *ptr)
+{
+ return static_cast<T *> (talloc_steal (new_ctx, ptr));
+}
+#undef talloc_steal
+#define talloc_steal _notmuch_talloc_steal
+#endif
+#endif
+
+#pragma GCC visibility pop
+
#endif