go: Use notmuch_database_destroy instead of notmuch_database_close

Adapt the go bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
Justus Winter 2012-04-22 14:07:55 +02:00 committed by David Bremner
parent 37e293eb5f
commit 22f73735c5

View file

@ -114,7 +114,7 @@ func NewDatabase(path string) *Database {
* An existing notmuch database can be identified by the presence of a * An existing notmuch database can be identified by the presence of a
* directory named ".notmuch" below 'path'. * directory named ".notmuch" below 'path'.
* *
* The caller should call notmuch_database_close when finished with * The caller should call notmuch_database_destroy when finished with
* this database. * this database.
* *
* In case of any failure, this function returns NULL, (after printing * In case of any failure, this function returns NULL, (after printing
@ -140,7 +140,7 @@ func OpenDatabase(path string, mode DatabaseMode) *Database {
/* Close the given notmuch database, freeing all associated /* Close the given notmuch database, freeing all associated
* resources. See notmuch_database_open. */ * resources. See notmuch_database_open. */
func (self *Database) Close() { func (self *Database) Close() {
C.notmuch_database_close(self.db) C.notmuch_database_destroy(self.db)
} }
/* Return the database path of the given database. /* Return the database path of the given database.