--- /dev/null
+Return-Path: <laochailan@web.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 1CFBE6DE179E\r
+ for <notmuch@notmuchmail.org>; Sun, 31 May 2015 05:23:01 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.047\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.047 tagged_above=-999 required=5 tests=[AWL=-1.613,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_SBL=2.596, RCVD_IN_SORBS_WEB=0.614,\r
+ RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id gRHAhN6jkKiC for <notmuch@notmuchmail.org>;\r
+ Sun, 31 May 2015 05:22:57 -0700 (PDT)\r
+X-Greylist: delayed 1205 seconds by postgrey-1.35 at arlo;\r
+ Sun, 31 May 2015 05:22:57 PDT\r
+Received: from mout-xforward.web.de (mout-xforward.web.de [82.165.159.2])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 18E6E6DE179D\r
+ for <notmuch@notmuchmail.org>; Sun, 31 May 2015 05:22:56 -0700 (PDT)\r
+Received: from localhost ([92.204.48.23]) by smtp.web.de (mrweb003) with\r
+ ESMTPSA (Nemesis) id 0Lb289-1ZNKCn1RcH-00kiHW; Sun, 31 May 2015 14:02:49\r
+ +0200\r
+From: laochailan <laochailan@web.de>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/5] formatted comments for better godoc output\r
+Date: Sun, 31 May 2015 14:02:13 +0200\r
+Message-Id: <1433073735-7721-4-git-send-email-laochailan@web.de>\r
+X-Mailer: git-send-email 2.4.2\r
+In-Reply-To: <1433073735-7721-1-git-send-email-laochailan@web.de>\r
+References: <1433073735-7721-1-git-send-email-laochailan@web.de>\r
+X-Provags-ID: V03:K0:5DP/+TyWYqHgWlnUxz3vyH8oCHc/vg8TI/7ZTNFbHWrqf1aMYHr\r
+ WRXyesRh43muG+tkaxcX88Ub+1bo54RfCo6auUtoHMvhKgTX0SdjCjwSx0HxG/kUt43txmT\r
+ hR6ztazo9M1Y6Aee8fTMcCnpv7bFbgx5eIXsolRcdvLhAJn7Ka4qEzQldK5U1WS4hVPYDb1\r
+ fxtqKSjyJQx174ya6IjMQ==\r
+X-UI-Out-Filterresults: junk:10;\r
+X-Mailman-Approved-At: Mon, 01 Jun 2015 09:14:44 -0700\r
+Cc: laochailan <laochailan@web.de>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 31 May 2015 12:23:01 -0000\r
+\r
+before it looked like this\r
+http://godoc.org/github.com/notmuch/notmuch/bindings/go/src/notmuch#Database.RemoveMessage\r
+---\r
+ bindings/go/src/notmuch/notmuch.go | 1325 +++++++++++++++++-------------------\r
+ 1 file changed, 632 insertions(+), 693 deletions(-)\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index bffc120..741fabf 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -44,8 +44,8 @@ func (self Status) String() string {\r
+ return ""\r
+ }\r
+ \r
+-/* Various opaque data types. For each notmuch_<foo>_t see the various\r
+- * notmuch_<foo> functions below. */\r
++// Various opaque data types. For each notmuch_<foo>_t see the various\r
++// notmuch_<foo> functions below.\r
+ \r
+ type Database struct {\r
+ db *C.notmuch_database_t\r
+@@ -108,23 +108,22 @@ func NewDatabase(path string) (*Database, Status) {\r
+ return self, st\r
+ }\r
+ \r
+-/* Open an existing notmuch database located at 'path'.\r
+- *\r
+- * The database should have been created at some time in the past,\r
+- * (not necessarily by this process), by calling\r
+- * notmuch_database_create with 'path'. By default the database should be\r
+- * opened for reading only. In order to write to the database you need to\r
+- * pass the NOTMUCH_DATABASE_MODE_READ_WRITE mode.\r
+- *\r
+- * An existing notmuch database can be identified by the presence of a\r
+- * directory named ".notmuch" below 'path'.\r
+- *\r
+- * The caller should call notmuch_database_destroy when finished with\r
+- * this database.\r
+- *\r
+- * In case of any failure, this function returns NULL, (after printing\r
+- * an error message on stderr).\r
+- */\r
++// Open an existing notmuch database located at 'path'.\r
++//\r
++// The database should have been created at some time in the past,\r
++// (not necessarily by this process), by calling\r
++// notmuch_database_create with 'path'. By default the database should be\r
++// opened for reading only. In order to write to the database you need to\r
++// pass the NOTMUCH_DATABASE_MODE_READ_WRITE mode.\r
++//\r
++// An existing notmuch database can be identified by the presence of a\r
++// directory named ".notmuch" below 'path'.\r
++//\r
++// The caller should call notmuch_database_destroy when finished with\r
++// this database.\r
++//\r
++// In case of any failure, this function returns NULL, (after printing\r
++// an error message on stderr).\r
+ func OpenDatabase(path string, mode DatabaseMode) (*Database, Status) {\r
+ \r
+ var c_path *C.char = C.CString(path)\r
+@@ -142,14 +141,13 @@ func OpenDatabase(path string, mode DatabaseMode) (*Database, Status) {\r
+ return self, st\r
+ }\r
+ \r
+-/* Close the given notmuch database, freeing all associated\r
+- * resources. See notmuch_database_open. */\r
++// Close the given notmuch database, freeing all associated\r
++// resources. See notmuch_database_open.\r
+ func (self *Database) Close() Status {\r
+ return Status(C.notmuch_database_destroy(self.db))\r
+ }\r
+ \r
+-/* Return the database path of the given database.\r
+- */\r
++// Return the database path of the given database.\r
+ func (self *Database) GetPath() string {\r
+ \r
+ /* The return value is a string owned by notmuch so should not be\r
+@@ -162,17 +160,17 @@ func (self *Database) GetPath() string {\r
+ return ""\r
+ }\r
+ \r
+-/* Return the database format version of the given database. */\r
++// Return the database format version of the given database.\r
+ func (self *Database) GetVersion() uint {\r
+ return uint(C.notmuch_database_get_version(self.db))\r
+ }\r
+ \r
+-/* Does this database need to be upgraded before writing to it?\r
+- *\r
+- * If this function returns TRUE then no functions that modify the\r
+- * database (notmuch_database_add_message, notmuch_message_add_tag,\r
+- * notmuch_directory_set_mtime, etc.) will work unless the function\r
+- * notmuch_database_upgrade is called successfully first. */\r
++// Does this database need to be upgraded before writing to it?\r
++//\r
++// If this function returns TRUE then no functions that modify the\r
++// database (notmuch_database_add_message, notmuch_message_add_tag,\r
++// notmuch_directory_set_mtime, etc.) will work unless the function\r
++// notmuch_database_upgrade is called successfully first.\r
+ func (self *Database) NeedsUpgrade() bool {\r
+ do_upgrade := C.notmuch_database_needs_upgrade(self.db)\r
+ if do_upgrade == 0 {\r
+@@ -183,14 +181,13 @@ func (self *Database) NeedsUpgrade() bool {\r
+ \r
+ // TODO: notmuch_database_upgrade\r
+ \r
+-/* Retrieve a directory object from the database for 'path'.\r
+- *\r
+- * Here, 'path' should be a path relative to the path of 'database'\r
+- * (see notmuch_database_get_path), or else should be an absolute path\r
+- * with initial components that match the path of 'database'.\r
+- *\r
+- * Can return NULL if a Xapian exception occurs.\r
+- */\r
++// Retrieve a directory object from the database for 'path'.\r
++//\r
++// Here, 'path' should be a path relative to the path of 'database'\r
++// (see notmuch_database_get_path), or else should be an absolute path\r
++// with initial components that match the path of 'database'.\r
++//\r
++// Can return NULL if a Xapian exception occurs.\r
+ func (self *Database) GetDirectory(path string) (*Directory, Status) {\r
+ var c_path *C.char = C.CString(path)\r
+ defer C.free(unsafe.Pointer(c_path))\r
+@@ -207,46 +204,45 @@ func (self *Database) GetDirectory(path string) (*Directory, Status) {\r
+ return &Directory{dir: c_dir}, st\r
+ }\r
+ \r
+-/* Add a new message to the given notmuch database.\r
+- *\r
+- * Here,'filename' should be a path relative to the path of\r
+- * 'database' (see notmuch_database_get_path), or else should be an\r
+- * absolute filename with initial components that match the path of\r
+- * 'database'.\r
+- *\r
+- * The file should be a single mail message (not a multi-message mbox)\r
+- * that is expected to remain at its current location, (since the\r
+- * notmuch database will reference the filename, and will not copy the\r
+- * entire contents of the file.\r
+- *\r
+- * If 'message' is not NULL, then, on successful return '*message'\r
+- * will be initialized to a message object that can be used for things\r
+- * such as adding tags to the just-added message. The user should call\r
+- * notmuch_message_destroy when done with the message. On any failure\r
+- * '*message' will be set to NULL.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Message successfully added to database.\r
+- *\r
+- * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred,\r
+- * message not added.\r
+- *\r
+- * NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: Message has the same message\r
+- * ID as another message already in the database. The new\r
+- * filename was successfully added to the message in the database\r
+- * (if not already present).\r
+- *\r
+- * NOTMUCH_STATUS_FILE_ERROR: an error occurred trying to open the\r
+- * file, (such as permission denied, or file not found,\r
+- * etc.). Nothing added to the database.\r
+- *\r
+- * NOTMUCH_STATUS_FILE_NOT_EMAIL: the contents of filename don't look\r
+- * like an email message. Nothing added to the database.\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so no message can be added.\r
+- */\r
++// Add a new message to the given notmuch database.\r
++//\r
++// Here,'filename' should be a path relative to the path of\r
++// 'database' (see notmuch_database_get_path), or else should be an\r
++// absolute filename with initial components that match the path of\r
++// 'database'.\r
++//\r
++// The file should be a single mail message (not a multi-message mbox)\r
++// that is expected to remain at its current location, (since the\r
++// notmuch database will reference the filename, and will not copy the\r
++// entire contents of the file.\r
++//\r
++// If 'message' is not NULL, then, on successful return '*message'\r
++// will be initialized to a message object that can be used for things\r
++// such as adding tags to the just-added message. The user should call\r
++// notmuch_message_destroy when done with the message. On any failure\r
++// '*message' will be set to NULL.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Message successfully added to database.\r
++//\r
++// NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred,\r
++// message not added.\r
++//\r
++// NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: Message has the same message\r
++// ID as another message already in the database. The new\r
++// filename was successfully added to the message in the database\r
++// (if not already present).\r
++//\r
++// NOTMUCH_STATUS_FILE_ERROR: an error occurred trying to open the\r
++// file, (such as permission denied, or file not found,\r
++// etc.). Nothing added to the database.\r
++//\r
++// NOTMUCH_STATUS_FILE_NOT_EMAIL: the contents of filename don't look\r
++// like an email message. Nothing added to the database.\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so no message can be added.\r
+ func (self *Database) AddMessage(fname string) (*Message, Status) {\r
+ var c_fname *C.char = C.CString(fname)\r
+ defer C.free(unsafe.Pointer(c_fname))\r
+@@ -261,30 +257,29 @@ func (self *Database) AddMessage(fname string) (*Message, Status) {\r
+ return &Message{message: c_msg}, st\r
+ }\r
+ \r
+-/* Remove a message from the given notmuch database.\r
+- *\r
+- * Note that only this particular filename association is removed from\r
+- * the database. If the same message (as determined by the message ID)\r
+- * is still available via other filenames, then the message will\r
+- * persist in the database for those filenames. When the last filename\r
+- * is removed for a particular message, the database content for that\r
+- * message will be entirely removed.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: The last filename was removed and the\r
+- * message was removed from the database.\r
+- *\r
+- * NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred,\r
+- * message not removed.\r
+- *\r
+- * NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: This filename was removed but\r
+- * the message persists in the database with at least one other\r
+- * filename.\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so no message can be removed.\r
+- */\r
++// Remove a message from the given notmuch database.\r
++//\r
++// Note that only this particular filename association is removed from\r
++// the database. If the same message (as determined by the message ID)\r
++// is still available via other filenames, then the message will\r
++// persist in the database for those filenames. When the last filename\r
++// is removed for a particular message, the database content for that\r
++// message will be entirely removed.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: The last filename was removed and the\r
++// message was removed from the database.\r
++//\r
++// NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred,\r
++// message not removed.\r
++//\r
++// NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: This filename was removed but\r
++// the message persists in the database with at least one other\r
++// filename.\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so no message can be removed.\r
+ func (self *Database) RemoveMessage(fname string) Status {\r
+ \r
+ var c_fname *C.char = C.CString(fname)\r
+@@ -298,18 +293,17 @@ func (self *Database) RemoveMessage(fname string) Status {\r
+ return Status(st)\r
+ }\r
+ \r
+-/* Find a message with the given message_id.\r
+- *\r
+- * If the database contains a message with the given message_id, then\r
+- * a new notmuch_message_t object is returned. The caller should call\r
+- * notmuch_message_destroy when done with the message.\r
+- *\r
+- * This function returns NULL in the following situations:\r
+- *\r
+- * * No message is found with the given message_id\r
+- * * An out-of-memory situation occurs\r
+- * * A Xapian exception occurs\r
+- */\r
++// Find a message with the given message_id.\r
++//\r
++// If the database contains a message with the given message_id, then\r
++// a new notmuch_message_t object is returned. The caller should call\r
++// notmuch_message_destroy when done with the message.\r
++//\r
++// This function returns NULL in the following situations:\r
++//\r
++// * No message is found with the given message_id\r
++// * An out-of-memory situation occurs\r
++// * A Xapian exception occurs\r
+ func (self *Database) FindMessage(message_id string) (*Message, Status) {\r
+ \r
+ var c_msg_id *C.char = C.CString(message_id)\r
+@@ -327,13 +321,12 @@ func (self *Database) FindMessage(message_id string) (*Message, Status) {\r
+ return msg, st\r
+ }\r
+ \r
+-/* Return a list of all tags found in the database.\r
+- *\r
+- * This function creates a list of all tags found in the database. The\r
+- * resulting list contains all tags from all messages found in the database.\r
+- *\r
+- * On error this function returns NULL.\r
+- */\r
++// Return a list of all tags found in the database.\r
++//\r
++// This function creates a list of all tags found in the database. The\r
++// resulting list contains all tags from all messages found in the database.\r
++//\r
++// On error this function returns NULL.\r
+ func (self *Database) GetAllTags() *Tags {\r
+ tags := C.notmuch_database_get_all_tags(self.db)\r
+ if tags == nil {\r
+@@ -342,30 +335,29 @@ func (self *Database) GetAllTags() *Tags {\r
+ return &Tags{tags: tags}\r
+ }\r
+ \r
+-/* Create a new query for 'database'.\r
+- *\r
+- * Here, 'database' should be an open database, (see\r
+- * notmuch_database_open and notmuch_database_create).\r
+- *\r
+- * For the query string, we'll document the syntax here more\r
+- * completely in the future, but it's likely to be a specialized\r
+- * version of the general Xapian query syntax:\r
+- *\r
+- * http://xapian.org/docs/queryparser.html\r
+- *\r
+- * As a special case, passing either a length-zero string, (that is ""),\r
+- * or a string consisting of a single asterisk (that is "*"), will\r
+- * result in a query that returns all messages in the database.\r
+- *\r
+- * See notmuch_query_set_sort for controlling the order of results.\r
+- * See notmuch_query_search_messages and notmuch_query_search_threads\r
+- * to actually execute the query.\r
+- *\r
+- * User should call notmuch_query_destroy when finished with this\r
+- * query.\r
+- *\r
+- * Will return NULL if insufficient memory is available.\r
+- */\r
++// Create a new query for 'database'.\r
++//\r
++// Here, 'database' should be an open database, (see\r
++// notmuch_database_open and notmuch_database_create).\r
++//\r
++// For the query string, we'll document the syntax here more\r
++// completely in the future, but it's likely to be a specialized\r
++// version of the general Xapian query syntax:\r
++//\r
++// http://xapian.org/docs/queryparser.html\r
++//\r
++// As a special case, passing either a length-zero string, (that is ""),\r
++// or a string consisting of a single asterisk (that is "*"), will\r
++// result in a query that returns all messages in the database.\r
++//\r
++// See notmuch_query_set_sort for controlling the order of results.\r
++// See notmuch_query_search_messages and notmuch_query_search_threads\r
++// to actually execute the query.\r
++//\r
++// User should call notmuch_query_destroy when finished with this\r
++// query.\r
++//\r
++// Will return NULL if insufficient memory is available.\r
+ func (self *Database) CreateQuery(query string) *Query {\r
+ \r
+ var c_query *C.char = C.CString(query)\r
+@@ -382,7 +374,7 @@ func (self *Database) CreateQuery(query string) *Query {\r
+ return &Query{query: q}\r
+ }\r
+ \r
+-/* Sort values for notmuch_query_set_sort */\r
++// Sort values for notmuch_query_set_sort\r
+ type Sort C.notmuch_sort_t\r
+ \r
+ const (\r
+@@ -392,7 +384,7 @@ const (\r
+ SORT_UNSORTED\r
+ )\r
+ \r
+-/* Return the query_string of this query. See notmuch_query_create. */\r
++// Return the query_string of this query. See notmuch_query_create.\r
+ func (self *Query) String() string {\r
+ // FIXME: do we own 'q' or not ?\r
+ q := C.notmuch_query_get_query_string(self.query)\r
+@@ -406,54 +398,53 @@ func (self *Query) String() string {\r
+ return ""\r
+ }\r
+ \r
+-/* Specify the sorting desired for this query. */\r
++// Specify the sorting desired for this query.\r
+ func (self *Query) SetSort(sort Sort) {\r
+ C.notmuch_query_set_sort(self.query, C.notmuch_sort_t(sort))\r
+ }\r
+ \r
+-/* Return the sort specified for this query. See notmuch_query_set_sort. */\r
++// Return the sort specified for this query. See notmuch_query_set_sort.\r
+ func (self *Query) GetSort() Sort {\r
+ return Sort(C.notmuch_query_get_sort(self.query))\r
+ }\r
+ \r
+-/* Execute a query for threads, returning a notmuch_threads_t object\r
+- * which can be used to iterate over the results. The returned threads\r
+- * object is owned by the query and as such, will only be valid until\r
+- * notmuch_query_destroy.\r
+- *\r
+- * Typical usage might be:\r
+- *\r
+- * notmuch_query_t *query;\r
+- * notmuch_threads_t *threads;\r
+- * notmuch_thread_t *thread;\r
+- *\r
+- * query = notmuch_query_create (database, query_string);\r
+- *\r
+- * for (threads = notmuch_query_search_threads (query);\r
+- * notmuch_threads_valid (threads);\r
+- * notmuch_threads_move_to_next (threads))\r
+- * {\r
+- * thread = notmuch_threads_get (threads);\r
+- * ....\r
+- * notmuch_thread_destroy (thread);\r
+- * }\r
+- *\r
+- * notmuch_query_destroy (query);\r
+- *\r
+- * Note: If you are finished with a thread before its containing\r
+- * query, you can call notmuch_thread_destroy to clean up some memory\r
+- * sooner (as in the above example). Otherwise, if your thread objects\r
+- * are long-lived, then you don't need to call notmuch_thread_destroy\r
+- * and all the memory will still be reclaimed when the query is\r
+- * destroyed.\r
+- *\r
+- * Note that there's no explicit destructor needed for the\r
+- * notmuch_threads_t object. (For consistency, we do provide a\r
+- * notmuch_threads_destroy function, but there's no good reason\r
+- * to call it if the query is about to be destroyed).\r
+- *\r
+- * If a Xapian exception occurs this function will return NULL.\r
+- */\r
++// Execute a query for threads, returning a notmuch_threads_t object\r
++// which can be used to iterate over the results. The returned threads\r
++// object is owned by the query and as such, will only be valid until\r
++// notmuch_query_destroy.\r
++//\r
++// Typical usage might be:\r
++//\r
++// notmuch_query_t *query;\r
++// notmuch_threads_t *threads;\r
++// notmuch_thread_t *thread;\r
++//\r
++// query = notmuch_query_create (database, query_string);\r
++//\r
++// for (threads = notmuch_query_search_threads (query);\r
++// notmuch_threads_valid (threads);\r
++// notmuch_threads_move_to_next (threads))\r
++// {\r
++// thread = notmuch_threads_get (threads);\r
++// ....\r
++// notmuch_thread_destroy (thread);\r
++// }\r
++//\r
++// notmuch_query_destroy (query);\r
++//\r
++// Note: If you are finished with a thread before its containing\r
++// query, you can call notmuch_thread_destroy to clean up some memory\r
++// sooner (as in the above example). Otherwise, if your thread objects\r
++// are long-lived, then you don't need to call notmuch_thread_destroy\r
++// and all the memory will still be reclaimed when the query is\r
++// destroyed.\r
++//\r
++// Note that there's no explicit destructor needed for the\r
++// notmuch_threads_t object. (For consistency, we do provide a\r
++// notmuch_threads_destroy function, but there's no good reason\r
++// to call it if the query is about to be destroyed).\r
++//\r
++// If a Xapian exception occurs this function will return NULL.\r
+ func (self *Query) SearchThreads() *Threads {\r
+ threads := C.notmuch_query_search_threads(self.query)\r
+ if threads == nil {\r
+@@ -462,44 +453,43 @@ func (self *Query) SearchThreads() *Threads {\r
+ return &Threads{threads: threads}\r
+ }\r
+ \r
+-/* Execute a query for messages, returning a notmuch_messages_t object\r
+- * which can be used to iterate over the results. The returned\r
+- * messages object is owned by the query and as such, will only be\r
+- * valid until notmuch_query_destroy.\r
+- *\r
+- * Typical usage might be:\r
+- *\r
+- * notmuch_query_t *query;\r
+- * notmuch_messages_t *messages;\r
+- * notmuch_message_t *message;\r
+- *\r
+- * query = notmuch_query_create (database, query_string);\r
+- *\r
+- * for (messages = notmuch_query_search_messages (query);\r
+- * notmuch_messages_valid (messages);\r
+- * notmuch_messages_move_to_next (messages))\r
+- * {\r
+- * message = notmuch_messages_get (messages);\r
+- * ....\r
+- * notmuch_message_destroy (message);\r
+- * }\r
+- *\r
+- * notmuch_query_destroy (query);\r
+- *\r
+- * Note: If you are finished with a message before its containing\r
+- * query, you can call notmuch_message_destroy to clean up some memory\r
+- * sooner (as in the above example). Otherwise, if your message\r
+- * objects are long-lived, then you don't need to call\r
+- * notmuch_message_destroy and all the memory will still be reclaimed\r
+- * when the query is destroyed.\r
+- *\r
+- * Note that there's no explicit destructor needed for the\r
+- * notmuch_messages_t object. (For consistency, we do provide a\r
+- * notmuch_messages_destroy function, but there's no good\r
+- * reason to call it if the query is about to be destroyed).\r
+- *\r
+- * If a Xapian exception occurs this function will return NULL.\r
+- */\r
++// Execute a query for messages, returning a notmuch_messages_t object\r
++// which can be used to iterate over the results. The returned\r
++// messages object is owned by the query and as such, will only be\r
++// valid until notmuch_query_destroy.\r
++//\r
++// Typical usage might be:\r
++//\r
++// notmuch_query_t *query;\r
++// notmuch_messages_t *messages;\r
++// notmuch_message_t *message;\r
++//\r
++// query = notmuch_query_create (database, query_string);\r
++//\r
++// for (messages = notmuch_query_search_messages (query);\r
++// notmuch_messages_valid (messages);\r
++// notmuch_messages_move_to_next (messages))\r
++// {\r
++// message = notmuch_messages_get (messages);\r
++// ....\r
++// notmuch_message_destroy (message);\r
++// }\r
++//\r
++// notmuch_query_destroy (query);\r
++//\r
++// Note: If you are finished with a message before its containing\r
++// query, you can call notmuch_message_destroy to clean up some memory\r
++// sooner (as in the above example). Otherwise, if your message\r
++// objects are long-lived, then you don't need to call\r
++// notmuch_message_destroy and all the memory will still be reclaimed\r
++// when the query is destroyed.\r
++//\r
++// Note that there's no explicit destructor needed for the\r
++// notmuch_messages_t object. (For consistency, we do provide a\r
++// notmuch_messages_destroy function, but there's no good\r
++// reason to call it if the query is about to be destroyed).\r
++//\r
++// If a Xapian exception occurs this function will return NULL.\r
+ func (self *Query) SearchMessages() *Messages {\r
+ msgs := C.notmuch_query_search_messages(self.query)\r
+ if msgs == nil {\r
+@@ -508,41 +498,38 @@ func (self *Query) SearchMessages() *Messages {\r
+ return &Messages{messages: msgs}\r
+ }\r
+ \r
+-/* Destroy a notmuch_query_t along with any associated resources.\r
+- *\r
+- * This will in turn destroy any notmuch_threads_t and\r
+- * notmuch_messages_t objects generated by this query, (and in\r
+- * turn any notmuch_thread_t and notmuch_message_t objects generated\r
+- * from those results, etc.), if such objects haven't already been\r
+- * destroyed.\r
+- */\r
++// Destroy a notmuch_query_t along with any associated resources.\r
++//\r
++// This will in turn destroy any notmuch_threads_t and\r
++// notmuch_messages_t objects generated by this query, (and in\r
++// turn any notmuch_thread_t and notmuch_message_t objects generated\r
++// from those results, etc.), if such objects haven't already been\r
++// destroyed.\r
+ func (self *Query) Destroy() {\r
+ if self.query != nil {\r
+ C.notmuch_query_destroy(self.query)\r
+ }\r
+ }\r
+ \r
+-/* Return an estimate of the number of messages matching a search\r
+- *\r
+- * This function performs a search and returns Xapian's best\r
+- * guess as to number of matching messages.\r
+- *\r
+- * If a Xapian exception occurs, this function may return 0 (after\r
+- * printing a message).\r
+- */\r
++// Return an estimate of the number of messages matching a search\r
++//\r
++// This function performs a search and returns Xapian's best\r
++// guess as to number of matching messages.\r
++//\r
++// If a Xapian exception occurs, this function may return 0 (after\r
++// printing a message).\r
+ func (self *Query) CountMessages() uint {\r
+ return uint(C.notmuch_query_count_messages(self.query))\r
+ }\r
+ \r
+-/* Is the given 'threads' iterator pointing at a valid thread.\r
+- *\r
+- * When this function returns TRUE, notmuch_threads_get will return a\r
+- * valid object. Whereas when this function returns FALSE,\r
+- * notmuch_threads_get will return NULL.\r
+- *\r
+- * See the documentation of notmuch_query_search_threads for example\r
+- * code showing how to iterate over a notmuch_threads_t object.\r
+- */\r
++// Is the given 'threads' iterator pointing at a valid thread.\r
++//\r
++// When this function returns TRUE, notmuch_threads_get will return a\r
++// valid object. Whereas when this function returns FALSE,\r
++// notmuch_threads_get will return NULL.\r
++//\r
++// See the documentation of notmuch_query_search_threads for example\r
++// code showing how to iterate over a notmuch_threads_t object.\r
+ func (self *Threads) Valid() bool {\r
+ if self.threads == nil {\r
+ return false\r
+@@ -554,17 +541,16 @@ func (self *Threads) Valid() bool {\r
+ return true\r
+ }\r
+ \r
+-/* Get the current thread from 'threads' as a notmuch_thread_t.\r
+- *\r
+- * Note: The returned thread belongs to 'threads' and has a lifetime\r
+- * identical to it (and the query to which it belongs).\r
+- *\r
+- * See the documentation of notmuch_query_search_threads for example\r
+- * code showing how to iterate over a notmuch_threads_t object.\r
+- *\r
+- * If an out-of-memory situation occurs, this function will return\r
+- * NULL.\r
+- */\r
++// Get the current thread from 'threads' as a notmuch_thread_t.\r
++//\r
++// Note: The returned thread belongs to 'threads' and has a lifetime\r
++// identical to it (and the query to which it belongs).\r
++//\r
++// See the documentation of notmuch_query_search_threads for example\r
++// code showing how to iterate over a notmuch_threads_t object.\r
++//\r
++// If an out-of-memory situation occurs, this function will return\r
++// NULL.\r
+ func (self *Threads) Get() *Thread {\r
+ if self.threads == nil {\r
+ return nil\r
+@@ -576,16 +562,15 @@ func (self *Threads) Get() *Thread {\r
+ return &Thread{thread}\r
+ }\r
+ \r
+-/* Move the 'threads' iterator to the next thread.\r
+- *\r
+- * If 'threads' is already pointing at the last thread then the\r
+- * iterator will be moved to a point just beyond that last thread,\r
+- * (where notmuch_threads_valid will return FALSE and\r
+- * notmuch_threads_get will return NULL).\r
+- *\r
+- * See the documentation of notmuch_query_search_threads for example\r
+- * code showing how to iterate over a notmuch_threads_t object.\r
+- */\r
++// Move the 'threads' iterator to the next thread.\r
++//\r
++// If 'threads' is already pointing at the last thread then the\r
++// iterator will be moved to a point just beyond that last thread,\r
++// (where notmuch_threads_valid will return FALSE and\r
++// notmuch_threads_get will return NULL).\r
++//\r
++// See the documentation of notmuch_query_search_threads for example\r
++// code showing how to iterate over a notmuch_threads_t object.\r
+ func (self *Threads) MoveToNext() {\r
+ if self.threads == nil {\r
+ return\r
+@@ -593,26 +578,23 @@ func (self *Threads) MoveToNext() {\r
+ C.notmuch_threads_move_to_next(self.threads)\r
+ }\r
+ \r
+-/* Destroy a notmuch_threads_t object.\r
+- *\r
+- * It's not strictly necessary to call this function. All memory from\r
+- * the notmuch_threads_t object will be reclaimed when the\r
+- * containg query object is destroyed.\r
+- */\r
++// Destroy a notmuch_threads_t object.\r
++//\r
++// It's not strictly necessary to call this function. All memory from\r
++// the notmuch_threads_t object will be reclaimed when the\r
++// containg query object is destroyed.\r
+ func (self *Threads) Destroy() {\r
+ if self.threads != nil {\r
+ C.notmuch_threads_destroy(self.threads)\r
+ }\r
+ }\r
+ \r
+-/**\r
+- * Get the thread ID of 'thread'.\r
+- *\r
+- * The returned string belongs to 'thread' and as such, should not be\r
+- * modified by the caller and will only be valid for as long as the\r
+- * thread is valid, (which is until notmuch_thread_destroy or until\r
+- * the query from which it derived is destroyed).\r
+- */\r
++// Get the thread ID of 'thread'.\r
++//\r
++// The returned string belongs to 'thread' and as such, should not be\r
++// modified by the caller and will only be valid for as long as the\r
++// thread is valid, (which is until notmuch_thread_destroy or until\r
++// the query from which it derived is destroyed).\r
+ func (self *Thread) GetThreadId() string {\r
+ if self.thread == nil {\r
+ return ""\r
+@@ -624,12 +606,10 @@ func (self *Thread) GetThreadId() string {\r
+ return C.GoString(id)\r
+ }\r
+ \r
+-/**\r
+- * Get the total number of messages in 'thread'.\r
+- *\r
+- * This count consists of all messages in the database belonging to\r
+- * this thread. Contrast with notmuch_thread_get_matched_messages() .\r
+- */\r
++// Get the total number of messages in 'thread'.\r
++//\r
++// This count consists of all messages in the database belonging to\r
++// this thread. Contrast with notmuch_thread_get_matched_messages() .\r
+ func (self *Thread) GetTotalMessages() int {\r
+ if self.thread == nil {\r
+ return 0\r
+@@ -637,16 +617,14 @@ func (self *Thread) GetTotalMessages() int {\r
+ return int(C.notmuch_thread_get_total_messages(self.thread))\r
+ }\r
+ \r
+-/**\r
+- * Get a notmuch_messages_t iterator for the top-level messages in\r
+- * 'thread' in oldest-first order.\r
+- *\r
+- * This iterator will not necessarily iterate over all of the messages\r
+- * in the thread. It will only iterate over the messages in the thread\r
+- * which are not replies to other messages in the thread.\r
+- *\r
+- * The returned list will be destroyed when the thread is destroyed.\r
+- */\r
++// Get a notmuch_messages_t iterator for the top-level messages in\r
++// 'thread' in oldest-first order.\r
++//\r
++// This iterator will not necessarily iterate over all of the messages\r
++// in the thread. It will only iterate over the messages in the thread\r
++// which are not replies to other messages in the thread.\r
++//\r
++// The returned list will be destroyed when the thread is destroyed.\r
+ func (self *Thread) GetToplevelMessages() (*Messages, Status) {\r
+ if self.thread == nil {\r
+ return nil, STATUS_NULL_POINTER\r
+@@ -659,12 +637,10 @@ func (self *Thread) GetToplevelMessages() (*Messages, Status) {\r
+ return &Messages{msgs}, STATUS_SUCCESS\r
+ }\r
+ \r
+-/**\r
+- * Get a notmuch_thread_t iterator for all messages in 'thread' in\r
+- * oldest-first order.\r
+- *\r
+- * The returned list will be destroyed when the thread is destroyed.\r
+- */\r
++// Get a notmuch_thread_t iterator for all messages in 'thread' in\r
++// oldest-first order.\r
++//\r
++// The returned list will be destroyed when the thread is destroyed.\r
+ func (self *Thread) GetMessages() (*Messages, Status) {\r
+ if self.thread == nil {\r
+ return nil, STATUS_NULL_POINTER\r
+@@ -677,15 +653,13 @@ func (self *Thread) GetMessages() (*Messages, Status) {\r
+ return &Messages{msgs}, STATUS_SUCCESS\r
+ }\r
+ \r
+-/**\r
+- * Get the number of messages in 'thread' that matched the search.\r
+- *\r
+- * This count includes only the messages in this thread that were\r
+- * matched by the search from which the thread was created and were\r
+- * not excluded by any exclude tags passed in with the query (see\r
+- * notmuch_query_add_tag_exclude). Contrast with\r
+- * notmuch_thread_get_total_messages() .\r
+- */\r
++// Get the number of messages in 'thread' that matched the search.\r
++//\r
++// This count includes only the messages in this thread that were\r
++// matched by the search from which the thread was created and were\r
++// not excluded by any exclude tags passed in with the query (see\r
++// notmuch_query_add_tag_exclude). Contrast with\r
++// notmuch_thread_get_total_messages().\r
+ func (self *Thread) GetMatchedMessages() int {\r
+ if self.thread == nil {\r
+ return 0\r
+@@ -693,22 +667,20 @@ func (self *Thread) GetMatchedMessages() int {\r
+ return int(C.notmuch_thread_get_matched_messages(self.thread))\r
+ }\r
+ \r
+-/**\r
+- * Get the authors of 'thread' as a UTF-8 string.\r
+- *\r
+- * The returned string is a comma-separated list of the names of the\r
+- * authors of mail messages in the query results that belong to this\r
+- * thread.\r
+- *\r
+- * The string contains authors of messages matching the query first, then\r
+- * non-matched authors (with the two groups separated by '|'). Within\r
+- * each group, authors are ordered by date.\r
+- *\r
+- * The returned string belongs to 'thread' and as such, should not be\r
+- * modified by the caller and will only be valid for as long as the\r
+- * thread is valid, (which is until notmuch_thread_destroy or until\r
+- * the query from which it derived is destroyed).\r
+- */\r
++// Get the authors of 'thread' as a UTF-8 string.\r
++//\r
++// The returned string is a comma-separated list of the names of the\r
++// authors of mail messages in the query results that belong to this\r
++// thread.\r
++//\r
++// The string contains authors of messages matching the query first, then\r
++// non-matched authors (with the two groups separated by '|'). Within\r
++// each group, authors are ordered by date.\r
++//\r
++// The returned string belongs to 'thread' and as such, should not be\r
++// modified by the caller and will only be valid for as long as the\r
++// thread is valid, (which is until notmuch_thread_destroy or until\r
++// the query from which it derived is destroyed).\r
+ func (self *Thread) GetAuthors() string {\r
+ if self.thread == nil {\r
+ return ""\r
+@@ -720,18 +692,16 @@ func (self *Thread) GetAuthors() string {\r
+ return C.GoString(str)\r
+ }\r
+ \r
+-/**\r
+- * Get the subject of 'thread' as a UTF-8 string.\r
+- *\r
+- * The subject is taken from the first message (according to the query\r
+- * order---see notmuch_query_set_sort) in the query results that\r
+- * belongs to this thread.\r
+- *\r
+- * The returned string belongs to 'thread' and as such, should not be\r
+- * modified by the caller and will only be valid for as long as the\r
+- * thread is valid, (which is until notmuch_thread_destroy or until\r
+- * the query from which it derived is destroyed).\r
+- */\r
++// Get the subject of 'thread' as a UTF-8 string.\r
++//\r
++// The subject is taken from the first message (according to the query\r
++// order---see notmuch_query_set_sort) in the query results that\r
++// belongs to this thread.\r
++//\r
++// The returned string belongs to 'thread' and as such, should not be\r
++// modified by the caller and will only be valid for as long as the\r
++// thread is valid, (which is until notmuch_thread_destroy or until\r
++// the query from which it derived is destroyed).\r
+ func (self *Thread) GetSubject() string {\r
+ if self.thread == nil {\r
+ return ""\r
+@@ -743,9 +713,7 @@ func (self *Thread) GetSubject() string {\r
+ return C.GoString(str)\r
+ }\r
+ \r
+-/**\r
+- * Get the date of the oldest message in 'thread' as a time_t value.\r
+- */\r
++// Get the date of the oldest message in 'thread' as a time_t value.\r
+ func (self *Thread) GetOldestDate() int64 {\r
+ if self.thread == nil {\r
+ return 0\r
+@@ -755,9 +723,7 @@ func (self *Thread) GetOldestDate() int64 {\r
+ return int64(date)\r
+ }\r
+ \r
+-/**\r
+- * Get the date of the newest message in 'thread' as a time_t value.\r
+- */\r
++// Get the date of the newest message in 'thread' as a time_t value.\r
+ func (self *Thread) GetNewestDate() int64 {\r
+ if self.thread == nil {\r
+ return 0\r
+@@ -767,43 +733,41 @@ func (self *Thread) GetNewestDate() int64 {\r
+ return int64(date)\r
+ }\r
+ \r
+-/**\r
+- * Get the tags for 'thread', returning a notmuch_tags_t object which\r
+- * can be used to iterate over all tags.\r
+- *\r
+- * Note: In the Notmuch database, tags are stored on individual\r
+- * messages, not on threads. So the tags returned here will be all\r
+- * tags of the messages which matched the search and which belong to\r
+- * this thread.\r
+- *\r
+- * The tags object is owned by the thread and as such, will only be\r
+- * valid for as long as the thread is valid, (for example, until\r
+- * notmuch_thread_destroy or until the query from which it derived is\r
+- * destroyed).\r
+- *\r
+- * Typical usage might be:\r
+- *\r
+- * notmuch_thread_t *thread;\r
+- * notmuch_tags_t *tags;\r
+- * const char *tag;\r
+- *\r
+- * thread = notmuch_threads_get (threads);\r
+- *\r
+- * for (tags = notmuch_thread_get_tags (thread);\r
+- * notmuch_tags_valid (tags);\r
+- * notmuch_tags_move_to_next (tags))\r
+- * {\r
+- * tag = notmuch_tags_get (tags);\r
+- * ....\r
+- * }\r
+- *\r
+- * notmuch_thread_destroy (thread);\r
+- *\r
+- * Note that there's no explicit destructor needed for the\r
+- * notmuch_tags_t object. (For consistency, we do provide a\r
+- * notmuch_tags_destroy function, but there's no good reason to call\r
+- * it if the message is about to be destroyed).\r
+- */\r
++// Get the tags for 'thread', returning a notmuch_tags_t object which\r
++// can be used to iterate over all tags.\r
++//\r
++// Note: In the Notmuch database, tags are stored on individual\r
++// messages, not on threads. So the tags returned here will be all\r
++// tags of the messages which matched the search and which belong to\r
++// this thread.\r
++//\r
++// The tags object is owned by the thread and as such, will only be\r
++// valid for as long as the thread is valid, (for example, until\r
++// notmuch_thread_destroy or until the query from which it derived is\r
++// destroyed).\r
++//\r
++// Typical usage might be:\r
++//\r
++// notmuch_thread_t *thread;\r
++// notmuch_tags_t *tags;\r
++// const char *tag;\r
++//\r
++// thread = notmuch_threads_get (threads);\r
++//\r
++// for (tags = notmuch_thread_get_tags (thread);\r
++// notmuch_tags_valid (tags);\r
++// notmuch_tags_move_to_next (tags))\r
++// {\r
++// tag = notmuch_tags_get (tags);\r
++// ....\r
++// }\r
++//\r
++// notmuch_thread_destroy (thread);\r
++//\r
++// Note that there's no explicit destructor needed for the\r
++// notmuch_tags_t object. (For consistency, we do provide a\r
++// notmuch_tags_destroy function, but there's no good reason to call\r
++// it if the message is about to be destroyed).\r
+ func (self *Thread) GetTags() *Tags {\r
+ if self.thread == nil {\r
+ return nil\r
+@@ -817,24 +781,21 @@ func (self *Thread) GetTags() *Tags {\r
+ return &Tags{tags}\r
+ }\r
+ \r
+-/**\r
+- * Destroy a notmuch_thread_t object.\r
+- */\r
++// Destroy a notmuch_thread_t object.\r
+ func (self *Thread) Destroy() {\r
+ if self.thread != nil {\r
+ C.notmuch_thread_destroy(self.thread)\r
+ }\r
+ }\r
+ \r
+-/* Is the given 'messages' iterator pointing at a valid message.\r
+- *\r
+- * When this function returns TRUE, notmuch_messages_get will return a\r
+- * valid object. Whereas when this function returns FALSE,\r
+- * notmuch_messages_get will return NULL.\r
+- *\r
+- * See the documentation of notmuch_query_search_messages for example\r
+- * code showing how to iterate over a notmuch_messages_t object.\r
+- */\r
++// Is the given 'messages' iterator pointing at a valid message.\r
++//\r
++// When this function returns TRUE, notmuch_messages_get will return a\r
++// valid object. Whereas when this function returns FALSE,\r
++// notmuch_messages_get will return NULL.\r
++//\r
++// See the documentation of notmuch_query_search_messages for example\r
++// code showing how to iterate over a notmuch_messages_t object.\r
+ func (self *Messages) Valid() bool {\r
+ if self.messages == nil {\r
+ return false\r
+@@ -846,17 +807,16 @@ func (self *Messages) Valid() bool {\r
+ return true\r
+ }\r
+ \r
+-/* Get the current message from 'messages' as a notmuch_message_t.\r
+- *\r
+- * Note: The returned message belongs to 'messages' and has a lifetime\r
+- * identical to it (and the query to which it belongs).\r
+- *\r
+- * See the documentation of notmuch_query_search_messages for example\r
+- * code showing how to iterate over a notmuch_messages_t object.\r
+- *\r
+- * If an out-of-memory situation occurs, this function will return\r
+- * NULL.\r
+- */\r
++// Get the current message from 'messages' as a notmuch_message_t.\r
++//\r
++// Note: The returned message belongs to 'messages' and has a lifetime\r
++// identical to it (and the query to which it belongs).\r
++//\r
++// See the documentation of notmuch_query_search_messages for example\r
++// code showing how to iterate over a notmuch_messages_t object.\r
++//\r
++// If an out-of-memory situation occurs, this function will return\r
++// NULL.\r
+ func (self *Messages) Get() *Message {\r
+ if self.messages == nil {\r
+ return nil\r
+@@ -868,16 +828,15 @@ func (self *Messages) Get() *Message {\r
+ return &Message{message: msg}\r
+ }\r
+ \r
+-/* Move the 'messages' iterator to the next message.\r
+- *\r
+- * If 'messages' is already pointing at the last message then the\r
+- * iterator will be moved to a point just beyond that last message,\r
+- * (where notmuch_messages_valid will return FALSE and\r
+- * notmuch_messages_get will return NULL).\r
+- *\r
+- * See the documentation of notmuch_query_search_messages for example\r
+- * code showing how to iterate over a notmuch_messages_t object.\r
+- */\r
++// Move the 'messages' iterator to the next message.\r
++//\r
++// If 'messages' is already pointing at the last message then the\r
++// iterator will be moved to a point just beyond that last message,\r
++// (where notmuch_messages_valid will return FALSE and\r
++// notmuch_messages_get will return NULL).\r
++//\r
++// See the documentation of notmuch_query_search_messages for example\r
++// code showing how to iterate over a notmuch_messages_t object.\r
+ func (self *Messages) MoveToNext() {\r
+ if self.messages == nil {\r
+ return\r
+@@ -885,30 +844,28 @@ func (self *Messages) MoveToNext() {\r
+ C.notmuch_messages_move_to_next(self.messages)\r
+ }\r
+ \r
+-/* Destroy a notmuch_messages_t object.\r
+- *\r
+- * It's not strictly necessary to call this function. All memory from\r
+- * the notmuch_messages_t object will be reclaimed when the containing\r
+- * query object is destroyed.\r
+- */\r
++// Destroy a notmuch_messages_t object.\r
++//\r
++// It's not strictly necessary to call this function. All memory from\r
++// the notmuch_messages_t object will be reclaimed when the containing\r
++// query object is destroyed.\r
+ func (self *Messages) Destroy() {\r
+ if self.messages != nil {\r
+ C.notmuch_messages_destroy(self.messages)\r
+ }\r
+ }\r
+ \r
+-/* Return a list of tags from all messages.\r
+- *\r
+- * The resulting list is guaranteed not to contain duplicated tags.\r
+- *\r
+- * WARNING: You can no longer iterate over messages after calling this\r
+- * function, because the iterator will point at the end of the list.\r
+- * We do not have a function to reset the iterator yet and the only\r
+- * way how you can iterate over the list again is to recreate the\r
+- * message list.\r
+- *\r
+- * The function returns NULL on error.\r
+- */\r
++// Return a list of tags from all messages.\r
++//\r
++// The resulting list is guaranteed not to contain duplicated tags.\r
++//\r
++// WARNING: You can no longer iterate over messages after calling this\r
++// function, because the iterator will point at the end of the list.\r
++// We do not have a function to reset the iterator yet and the only\r
++// way how you can iterate over the list again is to recreate the\r
++// message list.\r
++//\r
++// The function returns NULL on error.\r
+ func (self *Messages) CollectTags() *Tags {\r
+ if self.messages == nil {\r
+ return nil\r
+@@ -920,17 +877,16 @@ func (self *Messages) CollectTags() *Tags {\r
+ return &Tags{tags: tags}\r
+ }\r
+ \r
+-/* Get the message ID of 'message'.\r
+- *\r
+- * The returned string belongs to 'message' and as such, should not be\r
+- * modified by the caller and will only be valid for as long as the\r
+- * message is valid, (which is until the query from which it derived\r
+- * is destroyed).\r
+- *\r
+- * This function will not return NULL since Notmuch ensures that every\r
+- * message has a unique message ID, (Notmuch will generate an ID for a\r
+- * message if the original file does not contain one).\r
+- */\r
++// Get the message ID of 'message'.\r
++//\r
++// The returned string belongs to 'message' and as such, should not be\r
++// modified by the caller and will only be valid for as long as the\r
++// message is valid, (which is until the query from which it derived\r
++// is destroyed).\r
++//\r
++// This function will not return NULL since Notmuch ensures that every\r
++// message has a unique message ID, (Notmuch will generate an ID for a\r
++// message if the original file does not contain one).\r
+ func (self *Message) GetMessageId() string {\r
+ \r
+ if self.message == nil {\r
+@@ -945,17 +901,16 @@ func (self *Message) GetMessageId() string {\r
+ return C.GoString(id)\r
+ }\r
+ \r
+-/* Get the thread ID of 'message'.\r
+- *\r
+- * The returned string belongs to 'message' and as such, should not be\r
+- * modified by the caller and will only be valid for as long as the\r
+- * message is valid, (for example, until the user calls\r
+- * notmuch_message_destroy on 'message' or until a query from which it\r
+- * derived is destroyed).\r
+- *\r
+- * This function will not return NULL since Notmuch ensures that every\r
+- * message belongs to a single thread.\r
+- */\r
++// Get the thread ID of 'message'.\r
++//\r
++// The returned string belongs to 'message' and as such, should not be\r
++// modified by the caller and will only be valid for as long as the\r
++// message is valid, (for example, until the user calls\r
++// notmuch_message_destroy on 'message' or until a query from which it\r
++// derived is destroyed).\r
++//\r
++// This function will not return NULL since Notmuch ensures that every\r
++// message belongs to a single thread.\r
+ func (self *Message) GetThreadId() string {\r
+ \r
+ if self.message == nil {\r
+@@ -972,23 +927,22 @@ func (self *Message) GetThreadId() string {\r
+ return C.GoString(id)\r
+ }\r
+ \r
+-/* Get a notmuch_messages_t iterator for all of the replies to\r
+- * 'message'.\r
+- *\r
+- * Note: This call only makes sense if 'message' was ultimately\r
+- * obtained from a notmuch_thread_t object, (such as by coming\r
+- * directly from the result of calling notmuch_thread_get_\r
+- * toplevel_messages or by any number of subsequent\r
+- * calls to notmuch_message_get_replies).\r
+- *\r
+- * If 'message' was obtained through some non-thread means, (such as\r
+- * by a call to notmuch_query_search_messages), then this function\r
+- * will return NULL.\r
+- *\r
+- * If there are no replies to 'message', this function will return\r
+- * NULL. (Note that notmuch_messages_valid will accept that NULL\r
+- * value as legitimate, and simply return FALSE for it.)\r
+- */\r
++// Get a notmuch_messages_t iterator for all of the replies to\r
++// 'message'.\r
++//\r
++// Note: This call only makes sense if 'message' was ultimately\r
++// obtained from a notmuch_thread_t object, (such as by coming\r
++// directly from the result of calling notmuch_thread_get_\r
++// toplevel_messages or by any number of subsequent\r
++// calls to notmuch_message_get_replies).\r
++//\r
++// If 'message' was obtained through some non-thread means, (such as\r
++// by a call to notmuch_query_search_messages), then this function\r
++// will return NULL.\r
++//\r
++// If there are no replies to 'message', this function will return\r
++// NULL. (Note that notmuch_messages_valid will accept that NULL\r
++// value as legitimate, and simply return FALSE for it.)\r
+ func (self *Message) GetReplies() *Messages {\r
+ if self.message == nil {\r
+ return nil\r
+@@ -1000,20 +954,19 @@ func (self *Message) GetReplies() *Messages {\r
+ return &Messages{messages: msgs}\r
+ }\r
+ \r
+-/* Get a filename for the email corresponding to 'message'.\r
+- *\r
+- * The returned filename is an absolute filename, (the initial\r
+- * component will match notmuch_database_get_path() ).\r
+- *\r
+- * The returned string belongs to the message so should not be\r
+- * modified or freed by the caller (nor should it be referenced after\r
+- * the message is destroyed).\r
+- *\r
+- * Note: If this message corresponds to multiple files in the mail\r
+- * store, (that is, multiple files contain identical message IDs),\r
+- * this function will arbitrarily return a single one of those\r
+- * filenames.\r
+- */\r
++// Get a filename for the email corresponding to 'message'.\r
++//\r
++// The returned filename is an absolute filename, (the initial\r
++// component will match notmuch_database_get_path() ).\r
++//\r
++// The returned string belongs to the message so should not be\r
++// modified or freed by the caller (nor should it be referenced after\r
++// the message is destroyed).\r
++//\r
++// Note: If this message corresponds to multiple files in the mail\r
++// store, (that is, multiple files contain identical message IDs),\r
++// this function will arbitrarily return a single one of those\r
++// filenames.\r
+ func (self *Message) GetFileName() string {\r
+ if self.message == nil {\r
+ return ""\r
+@@ -1035,7 +988,7 @@ const (\r
+ MESSAGE_FLAG_MATCH Flag = 0\r
+ )\r
+ \r
+-/* Get a value of a flag for the email corresponding to 'message'. */\r
++// Get a value of a flag for the email corresponding to 'message'.\r
+ func (self *Message) GetFlag(flag Flag) bool {\r
+ if self.message == nil {\r
+ return false\r
+@@ -1047,7 +1000,7 @@ func (self *Message) GetFlag(flag Flag) bool {\r
+ return true\r
+ }\r
+ \r
+-/* Set a value of a flag for the email corresponding to 'message'. */\r
++// Set a value of a flag for the email corresponding to 'message'.\r
+ func (self *Message) SetFlag(flag Flag, value bool) {\r
+ if self.message == nil {\r
+ return\r
+@@ -1059,15 +1012,14 @@ func (self *Message) SetFlag(flag Flag, value bool) {\r
+ C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)\r
+ }\r
+ \r
+-/* Get the timestamp (seconds since the epoch) of 'message'.\r
+- *\r
+- * Return status:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Timestamp successfully retrieved\r
+- *\r
+- * NOTMUCH_STATUS_NULL_POINTER: The 'message' argument is NULL\r
+- *\r
+- */\r
++// Get the timestamp (seconds since the epoch) of 'message'.\r
++//\r
++// Return status:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Timestamp successfully retrieved\r
++//\r
++// NOTMUCH_STATUS_NULL_POINTER: The 'message' argument is NULL\r
++//\r
+ func (self *Message) GetDate() (int64, Status) {\r
+ if self.message == nil {\r
+ return -1, STATUS_NULL_POINTER\r
+@@ -1076,18 +1028,17 @@ func (self *Message) GetDate() (int64, Status) {\r
+ return int64(timestamp), STATUS_SUCCESS\r
+ }\r
+ \r
+-/* Get the value of the specified header from 'message'.\r
+- *\r
+- * The value will be read from the actual message file, not from the\r
+- * notmuch database. The header name is case insensitive.\r
+- *\r
+- * The returned string belongs to the message so should not be\r
+- * modified or freed by the caller (nor should it be referenced after\r
+- * the message is destroyed).\r
+- *\r
+- * Returns an empty string ("") if the message does not contain a\r
+- * header line matching 'header'. Returns NULL if any error occurs.\r
+- */\r
++// Get the value of the specified header from 'message'.\r
++//\r
++// The value will be read from the actual message file, not from the\r
++// notmuch database. The header name is case insensitive.\r
++//\r
++// The returned string belongs to the message so should not be\r
++// modified or freed by the caller (nor should it be referenced after\r
++// the message is destroyed).\r
++//\r
++// Returns an empty string ("") if the message does not contain a\r
++// header line matching 'header'. Returns NULL if any error occurs.\r
+ func (self *Message) GetHeader(header string) string {\r
+ if self.message == nil {\r
+ return ""\r
+@@ -1105,36 +1056,35 @@ func (self *Message) GetHeader(header string) string {\r
+ return C.GoString(value)\r
+ }\r
+ \r
+-/* Get the tags for 'message', returning a notmuch_tags_t object which\r
+- * can be used to iterate over all tags.\r
+- *\r
+- * The tags object is owned by the message and as such, will only be\r
+- * valid for as long as the message is valid, (which is until the\r
+- * query from which it derived is destroyed).\r
+- *\r
+- * Typical usage might be:\r
+- *\r
+- * notmuch_message_t *message;\r
+- * notmuch_tags_t *tags;\r
+- * const char *tag;\r
+- *\r
+- * message = notmuch_database_find_message (database, message_id);\r
+- *\r
+- * for (tags = notmuch_message_get_tags (message);\r
+- * notmuch_tags_valid (tags);\r
+- * notmuch_result_move_to_next (tags))\r
+- * {\r
+- * tag = notmuch_tags_get (tags);\r
+- * ....\r
+- * }\r
+- *\r
+- * notmuch_message_destroy (message);\r
+- *\r
+- * Note that there's no explicit destructor needed for the\r
+- * notmuch_tags_t object. (For consistency, we do provide a\r
+- * notmuch_tags_destroy function, but there's no good reason to call\r
+- * it if the message is about to be destroyed).\r
+- */\r
++// Get the tags for 'message', returning a notmuch_tags_t object which\r
++// can be used to iterate over all tags.\r
++//\r
++// The tags object is owned by the message and as such, will only be\r
++// valid for as long as the message is valid, (which is until the\r
++// query from which it derived is destroyed).\r
++//\r
++// Typical usage might be:\r
++//\r
++// notmuch_message_t *message;\r
++// notmuch_tags_t *tags;\r
++// const char *tag;\r
++//\r
++// message = notmuch_database_find_message (database, message_id);\r
++//\r
++// for (tags = notmuch_message_get_tags (message);\r
++// notmuch_tags_valid (tags);\r
++// notmuch_result_move_to_next (tags))\r
++// {\r
++// tag = notmuch_tags_get (tags);\r
++// ....\r
++// }\r
++//\r
++// notmuch_message_destroy (message);\r
++//\r
++// Note that there's no explicit destructor needed for the\r
++// notmuch_tags_t object. (For consistency, we do provide a\r
++// notmuch_tags_destroy function, but there's no good reason to call\r
++// it if the message is about to be destroyed).\r
+ func (self *Message) GetTags() *Tags {\r
+ if self.message == nil {\r
+ return nil\r
+@@ -1146,23 +1096,22 @@ func (self *Message) GetTags() *Tags {\r
+ return &Tags{tags: tags}\r
+ }\r
+ \r
+-/* The longest possible tag value. */\r
++// The longest possible tag value.\r
+ const TAG_MAX = 200\r
+ \r
+-/* Add a tag to the given message.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Tag successfully added to message\r
+- *\r
+- * NOTMUCH_STATUS_NULL_POINTER: The 'tag' argument is NULL\r
+- *\r
+- * NOTMUCH_STATUS_TAG_TOO_LONG: The length of 'tag' is too long\r
+- * (exceeds NOTMUCH_TAG_MAX)\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so message cannot be modified.\r
+- */\r
++// Add a tag to the given message.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Tag successfully added to message\r
++//\r
++// NOTMUCH_STATUS_NULL_POINTER: The 'tag' argument is NULL\r
++//\r
++// NOTMUCH_STATUS_TAG_TOO_LONG: The length of 'tag' is too long\r
++// (exceeds NOTMUCH_TAG_MAX)\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so message cannot be modified.\r
+ func (self *Message) AddTag(tag string) Status {\r
+ if self.message == nil {\r
+ return STATUS_NULL_POINTER\r
+@@ -1173,20 +1122,19 @@ func (self *Message) AddTag(tag string) Status {\r
+ return Status(C.notmuch_message_add_tag(self.message, c_tag))\r
+ }\r
+ \r
+-/* Remove a tag from the given message.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Tag successfully removed from message\r
+- *\r
+- * NOTMUCH_STATUS_NULL_POINTER: The 'tag' argument is NULL\r
+- *\r
+- * NOTMUCH_STATUS_TAG_TOO_LONG: The length of 'tag' is too long\r
+- * (exceeds NOTMUCH_TAG_MAX)\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so message cannot be modified.\r
+- */\r
++// Remove a tag from the given message.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Tag successfully removed from message\r
++//\r
++// NOTMUCH_STATUS_NULL_POINTER: The 'tag' argument is NULL\r
++//\r
++// NOTMUCH_STATUS_TAG_TOO_LONG: The length of 'tag' is too long\r
++// (exceeds NOTMUCH_TAG_MAX)\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so message cannot be modified.\r
+ func (self *Message) RemoveTag(tag string) Status {\r
+ if self.message == nil {\r
+ return STATUS_NULL_POINTER\r
+@@ -1197,14 +1145,13 @@ func (self *Message) RemoveTag(tag string) Status {\r
+ return Status(C.notmuch_message_remove_tag(self.message, c_tag))\r
+ }\r
+ \r
+-/* Remove all tags from the given message.\r
+- *\r
+- * See notmuch_message_freeze for an example showing how to safely\r
+- * replace tag values.\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so message cannot be modified.\r
+- */\r
++// Remove all tags from the given message.\r
++//\r
++// See notmuch_message_freeze for an example showing how to safely\r
++// replace tag values.\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so message cannot be modified.\r
+ func (self *Message) RemoveAllTags() Status {\r
+ if self.message == nil {\r
+ return STATUS_NULL_POINTER\r
+@@ -1212,46 +1159,45 @@ func (self *Message) RemoveAllTags() Status {\r
+ return Status(C.notmuch_message_remove_all_tags(self.message))\r
+ }\r
+ \r
+-/* Freeze the current state of 'message' within the database.\r
+- *\r
+- * This means that changes to the message state, (via\r
+- * notmuch_message_add_tag, notmuch_message_remove_tag, and\r
+- * notmuch_message_remove_all_tags), will not be committed to the\r
+- * database until the message is thawed with notmuch_message_thaw.\r
+- *\r
+- * Multiple calls to freeze/thaw are valid and these calls will\r
+- * "stack". That is there must be as many calls to thaw as to freeze\r
+- * before a message is actually thawed.\r
+- *\r
+- * The ability to do freeze/thaw allows for safe transactions to\r
+- * change tag values. For example, explicitly setting a message to\r
+- * have a given set of tags might look like this:\r
+- *\r
+- * notmuch_message_freeze (message);\r
+- *\r
+- * notmuch_message_remove_all_tags (message);\r
+- *\r
+- * for (i = 0; i < NUM_TAGS; i++)\r
+- * notmuch_message_add_tag (message, tags[i]);\r
+- *\r
+- * notmuch_message_thaw (message);\r
+- *\r
+- * With freeze/thaw used like this, the message in the database is\r
+- * guaranteed to have either the full set of original tag values, or\r
+- * the full set of new tag values, but nothing in between.\r
+- *\r
+- * Imagine the example above without freeze/thaw and the operation\r
+- * somehow getting interrupted. This could result in the message being\r
+- * left with no tags if the interruption happened after\r
+- * notmuch_message_remove_all_tags but before notmuch_message_add_tag.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Message successfully frozen.\r
+- *\r
+- * NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
+- * mode so message cannot be modified.\r
+- */\r
++// Freeze the current state of 'message' within the database.\r
++//\r
++// This means that changes to the message state, (via\r
++// notmuch_message_add_tag, notmuch_message_remove_tag, and\r
++// notmuch_message_remove_all_tags), will not be committed to the\r
++// database until the message is thawed with notmuch_message_thaw.\r
++//\r
++// Multiple calls to freeze/thaw are valid and these calls will\r
++// "stack". That is there must be as many calls to thaw as to freeze\r
++// before a message is actually thawed.\r
++//\r
++// The ability to do freeze/thaw allows for safe transactions to\r
++// change tag values. For example, explicitly setting a message to\r
++// have a given set of tags might look like this:\r
++//\r
++// notmuch_message_freeze (message);\r
++//\r
++// notmuch_message_remove_all_tags (message);\r
++//\r
++// for (i = 0; i < NUM_TAGS; i++)\r
++// notmuch_message_add_tag (message, tags[i]);\r
++//\r
++// notmuch_message_thaw (message);\r
++//\r
++// With freeze/thaw used like this, the message in the database is\r
++// guaranteed to have either the full set of original tag values, or\r
++// the full set of new tag values, but nothing in between.\r
++//\r
++// Imagine the example above without freeze/thaw and the operation\r
++// somehow getting interrupted. This could result in the message being\r
++// left with no tags if the interruption happened after\r
++// notmuch_message_remove_all_tags but before notmuch_message_add_tag.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Message successfully frozen.\r
++//\r
++// NOTMUCH_STATUS_READ_ONLY_DATABASE: Database was opened in read-only\r
++// mode so message cannot be modified.\r
+ func (self *Message) Freeze() Status {\r
+ if self.message == nil {\r
+ return STATUS_NULL_POINTER\r
+@@ -1259,26 +1205,25 @@ func (self *Message) Freeze() Status {\r
+ return Status(C.notmuch_message_freeze(self.message))\r
+ }\r
+ \r
+-/* Thaw the current 'message', synchronizing any changes that may have\r
+- * occurred while 'message' was frozen into the notmuch database.\r
+- *\r
+- * See notmuch_message_freeze for an example of how to use this\r
+- * function to safely provide tag changes.\r
+- *\r
+- * Multiple calls to freeze/thaw are valid and these calls with\r
+- * "stack". That is there must be as many calls to thaw as to freeze\r
+- * before a message is actually thawed.\r
+- *\r
+- * Return value:\r
+- *\r
+- * NOTMUCH_STATUS_SUCCESS: Message successfully thawed, (or at least\r
+- * its frozen count has successfully been reduced by 1).\r
+- *\r
+- * NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: An attempt was made to thaw\r
+- * an unfrozen message. That is, there have been an unbalanced\r
+- * number of calls to notmuch_message_freeze and\r
+- * notmuch_message_thaw.\r
+- */\r
++// Thaw the current 'message', synchronizing any changes that may have\r
++// occurred while 'message' was frozen into the notmuch database.\r
++//\r
++// See notmuch_message_freeze for an example of how to use this\r
++// function to safely provide tag changes.\r
++//\r
++// Multiple calls to freeze/thaw are valid and these calls with\r
++// "stack". That is there must be as many calls to thaw as to freeze\r
++// before a message is actually thawed.\r
++//\r
++// Return value:\r
++//\r
++// NOTMUCH_STATUS_SUCCESS: Message successfully thawed, (or at least\r
++// its frozen count has successfully been reduced by 1).\r
++//\r
++// NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: An attempt was made to thaw\r
++// an unfrozen message. That is, there have been an unbalanced\r
++// number of calls to notmuch_message_freeze and\r
++// notmuch_message_thaw.\r
+ func (self *Message) Thaw() Status {\r
+ if self.message == nil {\r
+ return STATUS_NULL_POINTER\r
+@@ -1287,14 +1232,13 @@ func (self *Message) Thaw() Status {\r
+ return Status(C.notmuch_message_thaw(self.message))\r
+ }\r
+ \r
+-/* Destroy a notmuch_message_t object.\r
+- *\r
+- * It can be useful to call this function in the case of a single\r
+- * query object with many messages in the result, (such as iterating\r
+- * over the entire database). Otherwise, it's fine to never call this\r
+- * function and there will still be no memory leaks. (The memory from\r
+- * the messages get reclaimed when the containing query is destroyed.)\r
+- */\r
++// Destroy a notmuch_message_t object.\r
++//\r
++// It can be useful to call this function in the case of a single\r
++// query object with many messages in the result, (such as iterating\r
++// over the entire database). Otherwise, it's fine to never call this\r
++// function and there will still be no memory leaks. (The memory from\r
++// the messages get reclaimed when the containing query is destroyed.)\r
+ func (self *Message) Destroy() {\r
+ if self.message == nil {\r
+ return\r
+@@ -1302,15 +1246,14 @@ func (self *Message) Destroy() {\r
+ C.notmuch_message_destroy(self.message)\r
+ }\r
+ \r
+-/* Is the given 'tags' iterator pointing at a valid tag.\r
+- *\r
+- * When this function returns TRUE, notmuch_tags_get will return a\r
+- * valid string. Whereas when this function returns FALSE,\r
+- * notmuch_tags_get will return NULL.\r
+- *\r
+- * See the documentation of notmuch_message_get_tags for example code\r
+- * showing how to iterate over a notmuch_tags_t object.\r
+- */\r
++// Is the given 'tags' iterator pointing at a valid tag.\r
++//\r
++// When this function returns TRUE, notmuch_tags_get will return a\r
++// valid string. Whereas when this function returns FALSE,\r
++// notmuch_tags_get will return NULL.\r
++//\r
++// See the documentation of notmuch_message_get_tags for example code\r
++// showing how to iterate over a notmuch_tags_t object.\r
+ func (self *Tags) Valid() bool {\r
+ if self.tags == nil {\r
+ return false\r
+@@ -1322,14 +1265,13 @@ func (self *Tags) Valid() bool {\r
+ return true\r
+ }\r
+ \r
+-/* Get the current tag from 'tags' as a string.\r
+- *\r
+- * Note: The returned string belongs to 'tags' and has a lifetime\r
+- * identical to it (and the query to which it ultimately belongs).\r
+- *\r
+- * See the documentation of notmuch_message_get_tags for example code\r
+- * showing how to iterate over a notmuch_tags_t object.\r
+- */\r
++// Get the current tag from 'tags' as a string.\r
++//\r
++// Note: The returned string belongs to 'tags' and has a lifetime\r
++// identical to it (and the query to which it ultimately belongs).\r
++//\r
++// See the documentation of notmuch_message_get_tags for example code\r
++// showing how to iterate over a notmuch_tags_t object.\r
+ func (self *Tags) Get() string {\r
+ if self.tags == nil {\r
+ return ""\r
+@@ -1343,16 +1285,15 @@ func (self *Tags) String() string {\r
+ return self.Get()\r
+ }\r
+ \r
+-/* Move the 'tags' iterator to the next tag.\r
+- *\r
+- * If 'tags' is already pointing at the last tag then the iterator\r
+- * will be moved to a point just beyond that last tag, (where\r
+- * notmuch_tags_valid will return FALSE and notmuch_tags_get will\r
+- * return NULL).\r
+- *\r
+- * See the documentation of notmuch_message_get_tags for example code\r
+- * showing how to iterate over a notmuch_tags_t object.\r
+- */\r
++// Move the 'tags' iterator to the next tag.\r
++//\r
++// If 'tags' is already pointing at the last tag then the iterator\r
++// will be moved to a point just beyond that last tag, (where\r
++// notmuch_tags_valid will return FALSE and notmuch_tags_get will\r
++// return NULL).\r
++//\r
++// See the documentation of notmuch_message_get_tags for example code\r
++// showing how to iterate over a notmuch_tags_t object.\r
+ func (self *Tags) MoveToNext() {\r
+ if self.tags == nil {\r
+ return\r
+@@ -1360,12 +1301,11 @@ func (self *Tags) MoveToNext() {\r
+ C.notmuch_tags_move_to_next(self.tags)\r
+ }\r
+ \r
+-/* Destroy a notmuch_tags_t object.\r
+- *\r
+- * It's not strictly necessary to call this function. All memory from\r
+- * the notmuch_tags_t object will be reclaimed when the containing\r
+- * message or query objects are destroyed.\r
+- */\r
++// Destroy a notmuch_tags_t object.\r
++//\r
++// It's not strictly necessary to call this function. All memory from\r
++// the notmuch_tags_t object will be reclaimed when the containing\r
++// message or query objects are destroyed.\r
+ func (self *Tags) Destroy() {\r
+ if self.tags == nil {\r
+ return\r
+@@ -1375,7 +1315,7 @@ func (self *Tags) Destroy() {\r
+ \r
+ // TODO: wrap notmuch_directory_<fct>\r
+ \r
+-/* Destroy a notmuch_directory_t object. */\r
++// Destroy a notmuch_directory_t object.\r
+ func (self *Directory) Destroy() {\r
+ if self.dir == nil {\r
+ return\r
+@@ -1385,15 +1325,14 @@ func (self *Directory) Destroy() {\r
+ \r
+ // TODO: wrap notmuch_filenames_<fct>\r
+ \r
+-/* Destroy a notmuch_filenames_t object.\r
+- *\r
+- * It's not strictly necessary to call this function. All memory from\r
+- * the notmuch_filenames_t object will be reclaimed when the\r
+- * containing directory object is destroyed.\r
+- *\r
+- * It is acceptable to pass NULL for 'filenames', in which case this\r
+- * function will do nothing.\r
+- */\r
++// Destroy a notmuch_filenames_t object.\r
++//\r
++// It's not strictly necessary to call this function. All memory from\r
++// the notmuch_filenames_t object will be reclaimed when the\r
++// containing directory object is destroyed.\r
++//\r
++// It is acceptable to pass NULL for 'filenames', in which case this\r
++// function will do nothing.\r
+ func (self *Filenames) Destroy() {\r
+ if self.fnames == nil {\r
+ return\r
+@@ -1401,4 +1340,4 @@ func (self *Filenames) Destroy() {\r
+ C.notmuch_filenames_destroy(self.fnames)\r
+ }\r
+ \r
+-/* EOF */\r
++// EOF\r
+-- \r
+2.4.2\r
+\r