[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Sebastien Binet
Austin Clements writes: > Hah. I guess nobody has tried to modify a notmuch database using the > Go bindings. > > Could this instead assign the constants to > C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their > values? It would be nice to do that for the Status values as

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Adrien Bustany
Using iota is the correct way to get the values in the enum increment automatically. The old code would just set all the enum values to 0. --- bindings/go/src/notmuch/notmuch.go |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Austin Clements
Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status values as well (which are correctly using iota,

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Adrien Bustany
Using iota is the correct way to get the values in the enum increment automatically. The old code would just set all the enum values to 0. --- bindings/go/src/notmuch/notmuch.go |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

Re: [PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Austin Clements
Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status values as well (which are correctly using iota,

Re: [PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Sebastien Binet
Austin Clements amdra...@mit.edu writes: Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status