+ *(list->tail) = node;
+ list->tail = &node->next;
+}
+
+void
+_notmuch_filename_list_destroy (notmuch_filename_list_t *list)
+{
+ talloc_free (list);
+}
+
+/* The notmuch_filenames_t is an iterator object for a
+ * notmuch_filename_list_t */
+notmuch_filenames_t *
+_notmuch_filenames_create (const void *ctx,
+ notmuch_filename_list_t *list)
+{
+ notmuch_filenames_t *filenames;
+
+ filenames = talloc (ctx, notmuch_filenames_t);
+ if (unlikely (filenames == NULL))
+ return NULL;
+
+ filenames->iterator = list->head;
+
+ return filenames;