summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fcfb619)
The signature of notmuch_database_find_message was changed in
02a30767
to report errors and the Go bindings were never updated. This brings
the Go bindings in sync with that change and at least makes them
compile with Go r60.3, the last release before Go 1.
* * An out-of-memory situation occurs
* * A Xapian exception occurs
*/
* * An out-of-memory situation occurs
* * A Xapian exception occurs
*/
-func (self *Database) FindMessage(message_id string) *Message {
+func (self *Database) FindMessage(message_id string) (*Message, Status) {
var c_msg_id *C.char = C.CString(message_id)
defer C.free(unsafe.Pointer(c_msg_id))
if c_msg_id == nil {
var c_msg_id *C.char = C.CString(message_id)
defer C.free(unsafe.Pointer(c_msg_id))
if c_msg_id == nil {
+ return nil, STATUS_OUT_OF_MEMORY
- msg := C.notmuch_database_find_message(self.db, c_msg_id)
- if msg == nil {
- return nil
+ msg := &Message{message:nil}
+ st := Status(C.notmuch_database_find_message(self.db, c_msg_id, &msg.message))
+ if st != STATUS_SUCCESS {
+ return nil, st
- return &Message{message:msg}
}
/* Return a list of all tags found in the database.
}
/* Return a list of all tags found in the database.