[PATCH 1/9] lib: read "property" terms from messages.
[notmuch-archives.git] / 6b / 74e36a1229b2986fd3ee04462dc7aae7ace78c
1 Return-Path: <adrien@bustany.org>\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 olra.theworths.org (Postfix) with ESMTP id 499FF431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 18 Jul 2012 11:41:06 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 5N6vU8HQ8vua for <notmuch@notmuchmail.org>;\r
16         Wed, 18 Jul 2012 11:41:05 -0700 (PDT)\r
17 Received: from mail.bustany.org (bustany.org [176.31.244.208])\r
18         by olra.theworths.org (Postfix) with ESMTP id DD652431FBD\r
19         for <notmuch@notmuchmail.org>; Wed, 18 Jul 2012 11:41:04 -0700 (PDT)\r
20 Received: from localhost.localdomain (91-158-2-79.elisa-laajakaista.fi\r
21         [91.158.2.79])\r
22         by mail.bustany.org (Postfix) with ESMTPSA id B19371400C0\r
23         for <notmuch@notmuchmail.org>; Wed, 18 Jul 2012 20:37:07 +0200 (CEST)\r
24 From: Adrien Bustany <adrien@bustany.org>\r
25 To: notmuch@notmuchmail.org\r
26 Subject: [PATCH 1/7] go: Use iota in enum bindings\r
27 Date: Wed, 18 Jul 2012 21:34:29 +0300\r
28 Message-Id: <1342636475-16057-2-git-send-email-adrien@bustany.org>\r
29 X-Mailer: git-send-email 1.7.7.6\r
30 In-Reply-To: <1342636475-16057-1-git-send-email-adrien@bustany.org>\r
31 References: <1342636475-16057-1-git-send-email-adrien@bustany.org>\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Wed, 18 Jul 2012 18:41:06 -0000\r
45 \r
46 Using iota is the correct way to get the values in the enum increment\r
47 automatically. The old code would just set all the enum values to 0.\r
48 ---\r
49  bindings/go/src/notmuch/notmuch.go |    6 +++---\r
50  1 files changed, 3 insertions(+), 3 deletions(-)\r
51 \r
52 diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
53 index 00bd53a..ecd7418 100644\r
54 --- a/bindings/go/src/notmuch/notmuch.go\r
55 +++ b/bindings/go/src/notmuch/notmuch.go\r
56 @@ -86,7 +86,7 @@ type Filenames struct {\r
57  type DatabaseMode C.notmuch_database_mode_t\r
58  \r
59  const (\r
60 -       DATABASE_MODE_READ_ONLY DatabaseMode = 0\r
61 +       DATABASE_MODE_READ_ONLY DatabaseMode = iota\r
62         DATABASE_MODE_READ_WRITE\r
63  )\r
64  \r
65 @@ -386,7 +386,7 @@ func (self *Database) CreateQuery(query string) *Query {\r
66  type Sort C.notmuch_sort_t\r
67  \r
68  const (\r
69 -       SORT_OLDEST_FIRST Sort = 0\r
70 +       SORT_OLDEST_FIRST Sort = iota\r
71         SORT_NEWEST_FIRST\r
72         SORT_MESSAGE_ID\r
73         SORT_UNSORTED\r
74 @@ -774,7 +774,7 @@ func (self *Message) GetFileName() string {\r
75  type Flag C.notmuch_message_flag_t\r
76  \r
77  const (\r
78 -       MESSAGE_FLAG_MATCH Flag = 0\r
79 +       MESSAGE_FLAG_MATCH Flag = iota\r
80  )\r
81  \r
82  /* Get a value of a flag for the email corresponding to 'message'. */\r
83 -- \r
84 1.7.7.6\r
85 \r