}
const char *
-notmuch_query_get_query_string (notmuch_query_t *query)
+notmuch_query_get_query_string (const notmuch_query_t *query)
{
return query->query_string;
}
}
notmuch_sort_t
-notmuch_query_get_sort (notmuch_query_t *query)
+notmuch_query_get_sort (const notmuch_query_t *query)
{
return query->sort;
}
GHashTable *hash;
unsigned int count;
notmuch_sort_t sort;
+ notmuch_status_t status;
sort = query->sort;
query->sort = NOTMUCH_SORT_UNSORTED;
- messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (status)
+ return 0;
+
query->sort = sort;
if (messages == NULL)
return 0;
}
notmuch_database_t *
-notmuch_query_get_database (notmuch_query_t *query)
+notmuch_query_get_database (const notmuch_query_t *query)
{
return query->notmuch;
}