unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] lib: update notmuch_tags_get examle to reflect api change
@ 2012-01-29 15:29 Allan Wind
  2012-01-30  7:53 ` Tomi Ollila
  0 siblings, 1 reply; 9+ messages in thread
From: Allan Wind @ 2012-01-29 15:29 UTC (permalink / raw)
  To: notmuch

The function notmuch_database_find_message_by_filename now requires a
notmuch_message_t and returns a notmuch_status_t.  This
change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
version 0.9.
---
 lib/notmuch.h |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/notmuch.h b/lib/notmuch.h
index 7929fe7..5e6e449 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);
  * Typical usage might be:
  *
  *     notmuch_message_t *message;
+ *     notmuch_status_t status;
  *     notmuch_tags_t *tags;
  *     const char *tag;
  *
- *     message = notmuch_database_find_message (database, message_id);
- *
- *     for (tags = notmuch_message_get_tags (message);
- *          notmuch_tags_valid (tags);
- *          notmuch_result_move_to_next (tags))
- *     {
- *         tag = notmuch_tags_get (tags);
- *         ....
+ *     status = notmuch_database_find_message (database, message_id, &message);
+ *     if(!status && message) {
+ *          for (tags = notmuch_message_get_tags (message);
+ *               notmuch_tags_valid (tags);
+ *               notmuch_result_move_to_next (tags))
+ *          {
+ *               tag = notmuch_tags_get (tags);
+ *               ....
+ *          }
+ *          notmuch_message_destroy (message);
  *     }
  *
- *     notmuch_message_destroy (message);
- *
  * Note that there's no explicit destructor needed for the
  * notmuch_tags_t object. (For consistency, we do provide a
  * notmuch_tags_destroy function, but there's no good reason to call
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-29 15:29 Allan Wind
@ 2012-01-30  7:53 ` Tomi Ollila
  0 siblings, 0 replies; 9+ messages in thread
From: Tomi Ollila @ 2012-01-30  7:53 UTC (permalink / raw)
  To: Allan Wind, notmuch

On Sun, 29 Jan 2012 10:29:01 -0500, Allan Wind <allan_wind@lifeintegrity.com> wrote:
> The function notmuch_database_find_message_by_filename now requires a
> notmuch_message_t and returns a notmuch_status_t.  This
> change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
> version 0.9.
> ---

Good, but

[ ... ]

> - *         ....
> + *     status = notmuch_database_find_message (database, message_id, &message);
> + *     if(!status && message) {
> + *          for (tags = notmuch_message_get_tags (message);

space missing between 'if' and '('

Tomi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] lib: update notmuch_tags_get examle to reflect api change
@ 2012-01-30 14:02 Allan Wind
  2012-01-30 14:04 ` Allan Wind
  2012-01-30 14:04 ` Tomi Ollila
  0 siblings, 2 replies; 9+ messages in thread
From: Allan Wind @ 2012-01-30 14:02 UTC (permalink / raw)
  To: notmuch

The function notmuch_database_find_message_by_filename now requires a
notmuch_message_t and returns a notmuch_status_t.  This
change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
version 0.9.
---
 lib/notmuch.h |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/notmuch.h b/lib/notmuch.h
index 7929fe7..5e6e449 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);
  * Typical usage might be:
  *
  *     notmuch_message_t *message;
+ *     notmuch_status_t status;
  *     notmuch_tags_t *tags;
  *     const char *tag;
  *
- *     message = notmuch_database_find_message (database, message_id);
- *
- *     for (tags = notmuch_message_get_tags (message);
- *          notmuch_tags_valid (tags);
- *          notmuch_result_move_to_next (tags))
- *     {
- *         tag = notmuch_tags_get (tags);
- *         ....
+ *     status = notmuch_database_find_message (database, message_id, &message);
+ *     if(!status && message) {
+ *          for (tags = notmuch_message_get_tags (message);
+ *               notmuch_tags_valid (tags);
+ *               notmuch_result_move_to_next (tags))
+ *          {
+ *               tag = notmuch_tags_get (tags);
+ *               ....
+ *          }
+ *          notmuch_message_destroy (message);
  *     }
  *
- *     notmuch_message_destroy (message);
- *
  * Note that there's no explicit destructor needed for the
  * notmuch_tags_t object. (For consistency, we do provide a
  * notmuch_tags_destroy function, but there's no good reason to call
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-30 14:02 [PATCH] lib: update notmuch_tags_get examle to reflect api change Allan Wind
@ 2012-01-30 14:04 ` Allan Wind
  2012-01-30 14:04 ` Tomi Ollila
  1 sibling, 0 replies; 9+ messages in thread
From: Allan Wind @ 2012-01-30 14:04 UTC (permalink / raw)
  To: notmuch

Ignore this one.


/Allan
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-30 14:02 [PATCH] lib: update notmuch_tags_get examle to reflect api change Allan Wind
  2012-01-30 14:04 ` Allan Wind
@ 2012-01-30 14:04 ` Tomi Ollila
  1 sibling, 0 replies; 9+ messages in thread
From: Tomi Ollila @ 2012-01-30 14:04 UTC (permalink / raw)
  To: Allan Wind, notmuch

On Mon, 30 Jan 2012 09:02:33 -0500, Allan Wind <allan_wind@lifeintegrity.com> wrote:
> The function notmuch_database_find_message_by_filename now requires a
> notmuch_message_t and returns a notmuch_status_t.  This
> change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
> version 0.9.
> ---
> + *     status = notmuch_database_find_message (database, message_id, &message);
> + *     if(!status && message) {
> + *          for (tags = notmuch_message_get_tags (message);

Space betweem 'if' and '('  missing.

Tomi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] lib: update notmuch_tags_get examle to reflect api change
@ 2012-01-30 14:05 Allan Wind
  2012-01-30 19:49 ` Dmitry Kurochkin
  2012-01-30 22:38 ` Austin Clements
  0 siblings, 2 replies; 9+ messages in thread
From: Allan Wind @ 2012-01-30 14:05 UTC (permalink / raw)
  To: notmuch

The function notmuch_database_find_message_by_filename now requires a
notmuch_message_t and returns a notmuch_status_t.  This
change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
version 0.9.
---
 lib/notmuch.h |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/notmuch.h b/lib/notmuch.h
index 7929fe7..5e6e449 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);
  * Typical usage might be:
  *
  *     notmuch_message_t *message;
+ *     notmuch_status_t status;
  *     notmuch_tags_t *tags;
  *     const char *tag;
  *
- *     message = notmuch_database_find_message (database, message_id);
- *
- *     for (tags = notmuch_message_get_tags (message);
- *          notmuch_tags_valid (tags);
- *          notmuch_result_move_to_next (tags))
- *     {
- *         tag = notmuch_tags_get (tags);
- *         ....
+ *     status = notmuch_database_find_message (database, message_id, &message);
+ *     if (!status && message) {
+ *          for (tags = notmuch_message_get_tags (message);
+ *               notmuch_tags_valid (tags);
+ *               notmuch_result_move_to_next (tags))
+ *          {
+ *               tag = notmuch_tags_get (tags);
+ *               ....
+ *          }
+ *          notmuch_message_destroy (message);
  *     }
  *
- *     notmuch_message_destroy (message);
- *
  * Note that there's no explicit destructor needed for the
  * notmuch_tags_t object. (For consistency, we do provide a
  * notmuch_tags_destroy function, but there's no good reason to call
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-30 14:05 Allan Wind
@ 2012-01-30 19:49 ` Dmitry Kurochkin
  2012-01-30 20:38   ` Allan Wind
  2012-01-30 22:38 ` Austin Clements
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry Kurochkin @ 2012-01-30 19:49 UTC (permalink / raw)
  To: Allan Wind, notmuch

Hi Allan.

I did not look at the patch, but there is a typo in the patch title:
s/examle/example/.

Regards,
  Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-30 19:49 ` Dmitry Kurochkin
@ 2012-01-30 20:38   ` Allan Wind
  0 siblings, 0 replies; 9+ messages in thread
From: Allan Wind @ 2012-01-30 20:38 UTC (permalink / raw)
  To: notmuch

On 2012-01-30 23:49:36, Dmitry Kurochkin wrote:
> I did not look at the patch, but there is a typo in the patch title:
> s/examle/example/.

Thanks.  4th attempt sent.  If that is still good enough then I 
am giving up.


/Allan
-- 
Allan Wind
Life Integrity, LLC
<http://lifeintegrity.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] lib: update notmuch_tags_get examle to reflect api change
  2012-01-30 14:05 Allan Wind
  2012-01-30 19:49 ` Dmitry Kurochkin
@ 2012-01-30 22:38 ` Austin Clements
  1 sibling, 0 replies; 9+ messages in thread
From: Austin Clements @ 2012-01-30 22:38 UTC (permalink / raw)
  To: Allan Wind, notmuch

LGTM.

On Mon, 30 Jan 2012 09:05:15 -0500, Allan Wind <allan_wind@lifeintegrity.com> wrote:
> The function notmuch_database_find_message_by_filename now requires a
> notmuch_message_t and returns a notmuch_status_t.  This
> change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
> version 0.9.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-30 22:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-30 14:02 [PATCH] lib: update notmuch_tags_get examle to reflect api change Allan Wind
2012-01-30 14:04 ` Allan Wind
2012-01-30 14:04 ` Tomi Ollila
  -- strict thread matches above, loose matches on Subject: below --
2012-01-30 14:05 Allan Wind
2012-01-30 19:49 ` Dmitry Kurochkin
2012-01-30 20:38   ` Allan Wind
2012-01-30 22:38 ` Austin Clements
2012-01-29 15:29 Allan Wind
2012-01-30  7:53 ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).