summaryrefslogtreecommitdiffstats
path: root/zix/tree.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-11 12:22:28 +0100
committerDavid Robillard <d@drobilla.net>2020-11-11 12:26:56 +0100
commit3c18febd87234f54c149bb4a6353e3b0e0103db7 (patch)
tree26c32150fada522778e8df63b747fbe10e7aa3dc /zix/tree.h
parent387f52cd29b6078d441da5fd07a951a481c10b6d (diff)
downloadzix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.gz
zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.bz2
zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.zip
Add const, pure, and malloc function attributes
Diffstat (limited to 'zix/tree.h')
-rw-r--r--zix/tree.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/zix/tree.h b/zix/tree.h
index 64b91f1..af8659e 100644
--- a/zix/tree.h
+++ b/zix/tree.h
@@ -61,7 +61,7 @@ zix_tree_free(ZixTree* t);
/**
Return the number of elements in `t`.
*/
-ZIX_API size_t
+ZIX_PURE_API size_t
zix_tree_size(const ZixTree* t);
/**
@@ -86,55 +86,55 @@ zix_tree_find(const ZixTree* t, const void* e, ZixTreeIter** ti);
/**
Return the data associated with the given tree item.
*/
-ZIX_API void*
+ZIX_PURE_API void*
zix_tree_get(const ZixTreeIter* ti);
/**
Return an iterator to the first (smallest) element in `t`.
*/
-ZIX_API ZixTreeIter*
+ZIX_PURE_API ZixTreeIter*
zix_tree_begin(ZixTree* t);
/**
Return an iterator the the element one past the last element in `t`.
*/
-ZIX_API ZixTreeIter*
+ZIX_CONST_API ZixTreeIter*
zix_tree_end(ZixTree* t);
/**
Return true iff `i` is an iterator to the end of its tree.
*/
-ZIX_API bool
+ZIX_CONST_API bool
zix_tree_iter_is_end(const ZixTreeIter* i);
/**
Return an iterator to the last (largest) element in `t`.
*/
-ZIX_API ZixTreeIter*
+ZIX_PURE_API ZixTreeIter*
zix_tree_rbegin(ZixTree* t);
/**
Return an iterator the the element one before the first element in `t`.
*/
-ZIX_API ZixTreeIter*
+ZIX_CONST_API ZixTreeIter*
zix_tree_rend(ZixTree* t);
/**
Return true iff `i` is an iterator to the reverse end of its tree.
*/
-ZIX_API bool
+ZIX_CONST_API bool
zix_tree_iter_is_rend(const ZixTreeIter* i);
/**
Return an iterator that points to the element one past `i`.
*/
-ZIX_API ZixTreeIter*
+ZIX_PURE_API ZixTreeIter*
zix_tree_iter_next(ZixTreeIter* i);
/**
Return an iterator that points to the element one before `i`.
*/
-ZIX_API ZixTreeIter*
+ZIX_PURE_API ZixTreeIter*
zix_tree_iter_prev(ZixTreeIter* i);
/**