X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch.h;h=ef29fb57507ed6e6caae96468a761a0aef7dc650;hb=3b8e3ab666a54407f9596a53c66ba8ce623ac91d;hp=559ac3ab5b4ca90d260f21e8f7157b678ff74592;hpb=9f673f3cf866d114edc77080cd9f9e266d403c14;p=notmuch diff --git a/notmuch.h b/notmuch.h index 559ac3ab..ef29fb57 100644 --- a/notmuch.h +++ b/notmuch.h @@ -51,6 +51,8 @@ typedef int notmuch_bool_t; * * NOTMUCH_STATUS_SUCCESS: No error occurred. * + * NOTMUCH_STATUS_OUT_OF_MEMORY: Out of memory + * * XXX: We don't really want to expose this lame XAPIAN_EXCEPTION * value. Instead we should map to things like DATABASE_LOCKED or * whatever. @@ -78,6 +80,7 @@ typedef int notmuch_bool_t; */ typedef enum _notmuch_status { NOTMUCH_STATUS_SUCCESS = 0, + NOTMUCH_STATUS_OUT_OF_MEMORY, NOTMUCH_STATUS_XAPIAN_EXCEPTION, NOTMUCH_STATUS_FILE_ERROR, NOTMUCH_STATUS_FILE_NOT_EMAIL, @@ -267,8 +270,8 @@ notmuch_database_add_message (notmuch_database_t *database, * a new notmuch_message_t object is returned. The caller should call * notmuch_message_destroy when done with the message. * - * If no message is found with the given message_id, this function - * returns NULL. + * If no message is found with the given message_id or if an + * out-of-memory situation occurs, this function returns NULL. */ notmuch_message_t * notmuch_database_find_message (notmuch_database_t *database, @@ -376,6 +379,9 @@ notmuch_results_has_more (notmuch_results_t *results); * * See the documentation of notmuch_query_search for example code * showing how to iterate over a notmuch_results_t object. + * + * If an out-of-memory situation occurs, this function will return + * NULL. */ notmuch_message_t * notmuch_results_get (notmuch_results_t *results);