diff options
author | David Robillard <d@drobilla.net> | 2011-09-19 16:37:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-19 16:37:22 +0000 |
commit | f3f2fb716a132559b3adae3d8e9f2e122172f9e1 (patch) | |
tree | d3018deb4f80015202694e155549781876c8e63a /src | |
parent | 2789cc7d0922b0e386bc28708a612433eaaa1742 (diff) | |
download | zix-f3f2fb716a132559b3adae3d8e9f2e122172f9e1.tar.gz zix-f3f2fb716a132559b3adae3d8e9f2e122172f9e1.tar.bz2 zix-f3f2fb716a132559b3adae3d8e9f2e122172f9e1.zip |
Export API functions. Use unchecked inline index function in search.
git-svn-id: http://svn.drobilla.net/zix/trunk@26 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'src')
-rw-r--r-- | src/sorted_array.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sorted_array.c b/src/sorted_array.c index e841380..7d5358b 100644 --- a/src/sorted_array.c +++ b/src/sorted_array.c @@ -130,6 +130,7 @@ zix_sorted_array_index_unchecked(const ZixSortedArray* a, size_t index) return (char*)a->array + (a->elem_size * index); } +ZIX_API void* zix_sorted_array_index(const ZixSortedArray* a, size_t index) { @@ -155,7 +156,7 @@ zix_sorted_array_find(const ZixSortedArray* a, intptr_t upper = a->num_elems - 1; while (upper >= lower) { const size_t i = lower + ((upper - lower) / 2); - void* elem_i = zix_sorted_array_index(a, i); + void* elem_i = zix_sorted_array_index_unchecked(a, i); const int cmp = a->cmp(elem_i, e, a->cmp_data); if (cmp == 0) { |