Example #1
0
/* Is the given 'threads' iterator pointing at a valid thread.
 *
 * When this function returns TRUE, notmuch_threads_get will return a
 * valid object. Whereas when this function returns FALSE,
 * notmuch_threads_get will return NULL.
 *
 * See the documentation of notmuch_query_search_threads for example
 * code showing how to iterate over a notmuch_threads_t object.
 */
func (self *Threads) Valid() bool {
	if self.threads == nil {
		return false
	}
	valid := C.notmuch_threads_valid(self.threads)
	if valid == 0 {
		return false
	}
	return true
}
Example #2
0
func (ts *Threads) valid() bool {
	cbool := C.notmuch_threads_valid(ts.toC())
	return int(cbool) != 0
}