Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / bf / af42475b0132b8941dd8fad3623cc848e321de
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 3A1836DE1648\r
6  for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 05:00:27 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.113\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.113 tagged_above=-999 required=5 tests=[AWL=0.113]\r
12  autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id tz5cnjo6HyLx for <notmuch@notmuchmail.org>;\r
16  Wed, 23 Sep 2015 05:00:25 -0700 (PDT)\r
17 Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id 2B4FC6DE1603\r
19  for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 05:00:25 -0700 (PDT)\r
20 Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
21  (envelope-from <bremner@tethera.net>)\r
22  id 1Zeii6-0001x2-Pv; Wed, 23 Sep 2015 11:59:42 +0000\r
23 Received: (nullmailer pid 26809 invoked by uid 1000); Wed, 23 Sep 2015\r
24  11:59:23 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: notmuch@notmuchmail.org\r
27 Subject: [PATCH] lib: constify arguments to notmuch_query_get_*\r
28 Date: Wed, 23 Sep 2015 08:59:14 -0300\r
29 Message-Id: <1443009554-26766-1-git-send-email-david@tethera.net>\r
30 X-Mailer: git-send-email 2.5.1\r
31 X-BeenThere: notmuch@notmuchmail.org\r
32 X-Mailman-Version: 2.1.18\r
33 Precedence: list\r
34 List-Id: "Use and development of the notmuch mail system."\r
35  <notmuch.notmuchmail.org>\r
36 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
37  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
38 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
39 List-Post: <mailto:notmuch@notmuchmail.org>\r
40 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
41 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
42  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
43 X-List-Received-Date: Wed, 23 Sep 2015 12:00:27 -0000\r
44 \r
45 These functions are all just accessors, and it's pretty clear they don't\r
46 modify the query struct. This also fixes one warning I created when I\r
47 introduced status.c.\r
48 ---\r
49  lib/notmuch.h | 6 +++---\r
50  lib/query.cc  | 6 +++---\r
51  2 files changed, 6 insertions(+), 6 deletions(-)\r
52 \r
53 diff --git a/lib/notmuch.h b/lib/notmuch.h\r
54 index 86b5b4d..8775683 100644\r
55 --- a/lib/notmuch.h\r
56 +++ b/lib/notmuch.h\r
57 @@ -728,13 +728,13 @@ typedef enum {\r
58   * Return the query_string of this query. See notmuch_query_create.\r
59   */\r
60  const char *\r
61 -notmuch_query_get_query_string (notmuch_query_t *query);\r
62 +notmuch_query_get_query_string (const notmuch_query_t *query);\r
63  \r
64  /**\r
65   * Return the notmuch database of this query. See notmuch_query_create.\r
66   */\r
67  notmuch_database_t *\r
68 -notmuch_query_get_database (notmuch_query_t *query);\r
69 +notmuch_query_get_database (const notmuch_query_t *query);\r
70  \r
71  /**\r
72   * Exclude values for notmuch_query_set_omit_excluded. The strange\r
73 @@ -791,7 +791,7 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort);\r
74   * notmuch_query_set_sort.\r
75   */\r
76  notmuch_sort_t\r
77 -notmuch_query_get_sort (notmuch_query_t *query);\r
78 +notmuch_query_get_sort (const notmuch_query_t *query);\r
79  \r
80  /**\r
81   * Add a tag that will be excluded from the query results by default.\r
82 diff --git a/lib/query.cc b/lib/query.cc\r
83 index f53215d..8cf0a07 100644\r
84 --- a/lib/query.cc\r
85 +++ b/lib/query.cc\r
86 @@ -98,7 +98,7 @@ notmuch_query_create (notmuch_database_t *notmuch,\r
87  }\r
88  \r
89  const char *\r
90 -notmuch_query_get_query_string (notmuch_query_t *query)\r
91 +notmuch_query_get_query_string (const notmuch_query_t *query)\r
92  {\r
93      return query->query_string;\r
94  }\r
95 @@ -117,7 +117,7 @@ notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort)\r
96  }\r
97  \r
98  notmuch_sort_t\r
99 -notmuch_query_get_sort (notmuch_query_t *query)\r
100 +notmuch_query_get_sort (const notmuch_query_t *query)\r
101  {\r
102      return query->sort;\r
103  }\r
104 @@ -660,7 +660,7 @@ notmuch_query_count_threads (notmuch_query_t *query)\r
105  }\r
106  \r
107  notmuch_database_t *\r
108 -notmuch_query_get_database (notmuch_query_t *query)\r
109 +notmuch_query_get_database (const notmuch_query_t *query)\r
110  {\r
111      return query->notmuch;\r
112  }\r
113 -- \r
114 2.5.1\r
115 \r