mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
lib: constify arguments to notmuch_query_get_*
These functions are all just accessors, and it's pretty clear they don't modify the query struct. This also fixes one warning I created when I introduced status.c.
This commit is contained in:
parent
6cdd34a4c7
commit
93ee4faa4d
2 changed files with 6 additions and 6 deletions
|
@ -728,13 +728,13 @@ typedef enum {
|
|||
* Return the query_string of this query. See notmuch_query_create.
|
||||
*/
|
||||
const char *
|
||||
notmuch_query_get_query_string (notmuch_query_t *query);
|
||||
notmuch_query_get_query_string (const notmuch_query_t *query);
|
||||
|
||||
/**
|
||||
* Return the notmuch database of this query. See notmuch_query_create.
|
||||
*/
|
||||
notmuch_database_t *
|
||||
notmuch_query_get_database (notmuch_query_t *query);
|
||||
notmuch_query_get_database (const notmuch_query_t *query);
|
||||
|
||||
/**
|
||||
* Exclude values for notmuch_query_set_omit_excluded. The strange
|
||||
|
@ -791,7 +791,7 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort);
|
|||
* notmuch_query_set_sort.
|
||||
*/
|
||||
notmuch_sort_t
|
||||
notmuch_query_get_sort (notmuch_query_t *query);
|
||||
notmuch_query_get_sort (const notmuch_query_t *query);
|
||||
|
||||
/**
|
||||
* Add a tag that will be excluded from the query results by default.
|
||||
|
|
|
@ -98,7 +98,7 @@ notmuch_query_create (notmuch_database_t *notmuch,
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort)
|
|||
}
|
||||
|
||||
notmuch_sort_t
|
||||
notmuch_query_get_sort (notmuch_query_t *query)
|
||||
notmuch_query_get_sort (const notmuch_query_t *query)
|
||||
{
|
||||
return query->sort;
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ notmuch_query_count_threads (notmuch_query_t *query)
|
|||
}
|
||||
|
||||
notmuch_database_t *
|
||||
notmuch_query_get_database (notmuch_query_t *query)
|
||||
notmuch_query_get_database (const notmuch_query_t *query)
|
||||
{
|
||||
return query->notmuch;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue