mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
lib: split notmuch_query_create
Most of the function will be re-usable when creating a query from an s-expression.
This commit is contained in:
parent
a83ad52da4
commit
34733fa25e
1 changed files with 16 additions and 3 deletions
17
lib/query.cc
17
lib/query.cc
|
@ -84,8 +84,8 @@ _notmuch_query_destructor (notmuch_query_t *query)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_query_t *
|
static notmuch_query_t *
|
||||||
notmuch_query_create (notmuch_database_t *notmuch,
|
_notmuch_query_constructor (notmuch_database_t *notmuch,
|
||||||
const char *query_string)
|
const char *query_string)
|
||||||
{
|
{
|
||||||
notmuch_query_t *query;
|
notmuch_query_t *query;
|
||||||
|
@ -116,6 +116,19 @@ notmuch_query_create (notmuch_database_t *notmuch,
|
||||||
return query;
|
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
|
static notmuch_status_t
|
||||||
_notmuch_query_ensure_parsed (notmuch_query_t *query)
|
_notmuch_query_ensure_parsed (notmuch_query_t *query)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue