summaryrefslogtreecommitdiffstats
path: root/src/sord.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-01 19:30:36 +0000
committerDavid Robillard <d@drobilla.net>2011-02-01 19:30:36 +0000
commitc548e35abaf65266f2d806e375cb8e38adf705c4 (patch)
treeb2f50ad0d2bff55a105c25fa6007d0a841087033 /src/sord.c
parent07e2e5c82e533d12b902dab619a2f74970aca09b (diff)
downloadsord-c548e35abaf65266f2d806e375cb8e38adf705c4.tar.gz
sord-c548e35abaf65266f2d806e375cb8e38adf705c4.tar.bz2
sord-c548e35abaf65266f2d806e375cb8e38adf705c4.zip
Terser iteration API.
git-svn-id: http://svn.drobilla.net/sord/trunk@14 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord.c')
-rw-r--r--src/sord.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sord.c b/src/sord.c
index 00b86ed..7f050e2 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -256,7 +256,7 @@ sord_tuple_compare(const void* x_ptr, const void* y_ptr, void* user_data)
}
static inline bool
-sord_iter_next(SordIter iter)
+sord_iter_forward(SordIter iter)
{
if (!iter->skip_graphs) {
iter->cur = g_sequence_iter_next(iter->cur);
@@ -286,7 +286,7 @@ sord_iter_seek_match(SordIter iter)
{
for (iter->end = true;
!g_sequence_iter_is_end(iter->cur);
- sord_iter_next(iter)) {
+ sord_iter_forward(iter)) {
const SordID* const key = (const SordID*)g_sequence_get(iter->cur);
if (sord_tuple_match_inline(key, iter->pat))
return (iter->end = false);
@@ -316,7 +316,7 @@ sord_iter_seek_match_range(SordIter iter)
return true;
}
}
- } while (!sord_iter_next(iter));
+ } while (!sord_iter_forward(iter));
return (iter->end = true); // Reached end
}
@@ -381,13 +381,13 @@ sord_iter_get(SordIter iter, SordTuple id)
}
bool
-sord_iter_increment(SordIter iter)
+sord_iter_next(SordIter iter)
{
if (iter->end)
return true;
const SordID* key;
- iter->end = sord_iter_next(iter);
+ iter->end = sord_iter_forward(iter);
if (!iter->end) {
switch (iter->mode) {
case ALL:
@@ -432,7 +432,7 @@ sord_iter_increment(SordIter iter)
}
bool
-sord_iter_is_end(SordIter iter)
+sord_iter_end(SordIter iter)
{
return !iter || iter->end;
}