예제 #1
0
/* Is the given 'messages' iterator pointing at a valid message.
 *
 * When this function returns TRUE, notmuch_messages_get will return a
 * valid object. Whereas when this function returns FALSE,
 * notmuch_messages_get will return NULL.
 *
 * See the documentation of notmuch_query_search_messages for example
 * code showing how to iterate over a notmuch_messages_t object.
 */
func (self *Messages) Valid() bool {
	if self.messages == nil {
		return false
	}
	valid := C.notmuch_messages_valid(self.messages)
	if valid == 0 {
		return false
	}
	return true
}
예제 #2
0
파일: messages.go 프로젝트: gmuch/gmuch
func (ms *Messages) valid() bool {
	cbool := C.notmuch_messages_valid(ms.toC())
	return int(cbool) != 0
}