{
notmuch_query_t *query;
notmuch_threads_t *threads;
+ notmuch_status_t status;
Data_Get_Notmuch_Query (self, query);
- threads = notmuch_query_search_threads (query);
- if (!threads)
- rb_raise (notmuch_rb_eMemoryError, "Out of memory");
+ status = notmuch_query_search_threads_st (query, &threads);
+ if (status)
+ notmuch_rb_status_raise (status);
return Data_Wrap_Struct (notmuch_rb_cThreads, NULL, NULL, threads);
}
{
notmuch_query_t *query;
notmuch_messages_t *messages;
+ notmuch_status_t status;
Data_Get_Notmuch_Query (self, query);
- messages = notmuch_query_search_messages (query);
- if (!messages)
- rb_raise (notmuch_rb_eMemoryError, "Out of memory");
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (status)
+ notmuch_rb_status_raise (status);
return Data_Wrap_Struct (notmuch_rb_cMessages, NULL, NULL, messages);
}