]> git.notmuchmail.org Git - notmuch/commitdiff
go: fix the notmuch status constants
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Wed, 9 May 2012 10:23:07 +0000 (12:23 +0200)
committerDavid Bremner <bremner@debian.org>
Fri, 11 May 2012 11:28:21 +0000 (08:28 -0300)
Formerly all the constants were set to zero since in golang constants
are set to the previous value if no new value is specified. Use the
iota operator that is incremented after each use to fix this issue.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/go/pkg/notmuch.go

index f9f86b5e3c8f928bddac6f781a345d923c5af0f3..e065b547ab8bbca0c27de968cac48b28d3ef9fc9 100644 (file)
@@ -14,7 +14,7 @@ import "unsafe"
 // Status codes used for the return values of most functions
 type Status C.notmuch_status_t
 const (
-       STATUS_SUCCESS Status = 0
+       STATUS_SUCCESS Status = iota
        STATUS_OUT_OF_MEMORY
     STATUS_READ_ONLY_DATABASE
     STATUS_XAPIAN_EXCEPTION