aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/tags.c
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-03-09 09:22:29 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-03-09 09:22:29 -0800
commit4e5d2f22db290a830c0267f34b519c6138af00ed (patch)
treeb75346865280153187774efb4cf38562fe912bfc /lib/tags.c
parentc5085642b8c6495ffea3d5709aa6da14cd1d8688 (diff)
lib: Rename iterator functions to prepare for reverse iteration.
We rename 'has_more' to 'valid' so that it can function whether iterating in a forward or reverse direction. We also rename 'advance' to 'move_to_next' to setup parallel naming with the proposed functions 'move_to_first', 'move_to_last', and 'move_to_previous'.
Diffstat (limited to 'lib/tags.c')
-rw-r--r--lib/tags.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/tags.c b/lib/tags.c
index 85507e91..8fe4a3f0 100644
--- a/lib/tags.c
+++ b/lib/tags.c
@@ -77,7 +77,8 @@ _notmuch_tags_add_tag (notmuch_tags_t *tags, const char *tag)
*
* The internal creator of 'tags' should call this function before
* returning 'tags' to the user to call the public functions such as
- * notmuch_tags_has_more, notmuch_tags_get, and notmuch_tags_advance. */
+ * notmuch_tags_valid, notmuch_tags_get, and
+ * notmuch_tags_move_to_next. */
void
_notmuch_tags_prepare_iterator (notmuch_tags_t *tags)
{
@@ -89,7 +90,7 @@ _notmuch_tags_prepare_iterator (notmuch_tags_t *tags)
}
notmuch_bool_t
-notmuch_tags_has_more (notmuch_tags_t *tags)
+notmuch_tags_valid (notmuch_tags_t *tags)
{
return tags->iterator != NULL;
}
@@ -104,7 +105,7 @@ notmuch_tags_get (notmuch_tags_t *tags)
}
void
-notmuch_tags_advance (notmuch_tags_t *tags)
+notmuch_tags_move_to_next (notmuch_tags_t *tags)
{
if (tags->iterator == NULL)
return;