X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fquery.cc;h=39b85e9111c32ecff1c084a3efb7ae27351be8da;hb=34733fa25ed3ad8bd48621d66b7877af3426f544;hp=792aba219fa48d53e3b761089eac1d4349b5c0fb;hpb=b23902a61158ecdbca2d9d96c6eaf509d6e3d205;p=notmuch diff --git a/lib/query.cc b/lib/query.cc index 792aba21..39b85e91 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -84,9 +84,9 @@ _notmuch_query_destructor (notmuch_query_t *query) return 0; } -notmuch_query_t * -notmuch_query_create (notmuch_database_t *notmuch, - const char *query_string) +static notmuch_query_t * +_notmuch_query_constructor (notmuch_database_t *notmuch, + const char *query_string) { notmuch_query_t *query; @@ -116,6 +116,19 @@ notmuch_query_create (notmuch_database_t *notmuch, return query; } +notmuch_query_t * +notmuch_query_create (notmuch_database_t *notmuch, + const char *query_string) +{ + + notmuch_query_t *query = _notmuch_query_constructor (notmuch, query_string); + + if (! query) + return NULL; + + return query; +} + static notmuch_status_t _notmuch_query_ensure_parsed (notmuch_query_t *query) {