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
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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
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
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
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
49 bindings/go/src/notmuch/notmuch.go | 6 +++---
\r
50 1 files changed, 3 insertions(+), 3 deletions(-)
\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
60 - DATABASE_MODE_READ_ONLY DatabaseMode = 0
\r
61 + DATABASE_MODE_READ_ONLY DatabaseMode = iota
\r
62 DATABASE_MODE_READ_WRITE
\r
65 @@ -386,7 +386,7 @@ func (self *Database) CreateQuery(query string) *Query {
\r
66 type Sort C.notmuch_sort_t
\r
69 - SORT_OLDEST_FIRST Sort = 0
\r
70 + SORT_OLDEST_FIRST Sort = iota
\r
74 @@ -774,7 +774,7 @@ func (self *Message) GetFileName() string {
\r
75 type Flag C.notmuch_message_flag_t
\r
78 - MESSAGE_FLAG_MATCH Flag = 0
\r
79 + MESSAGE_FLAG_MATCH Flag = iota
\r
82 /* Get a value of a flag for the email corresponding to 'message'. */
\r