Sun, 16 Feb 2025 12:17:18 +0100
add convenience type CxIteratorBase
src/cx/iterator.h | file | annotate | diff | comparison | revisions | |
src/cx/tree.h | file | annotate | diff | comparison | revisions | |
src/tree.c | file | annotate | diff | comparison | revisions |
--- a/src/cx/iterator.h Sun Feb 16 12:15:27 2025 +0100 +++ b/src/cx/iterator.h Sun Feb 16 12:17:18 2025 +0100 @@ -80,6 +80,12 @@ }; /** + * Convenience type definition for the base structure of an iterator. + * @see #CX_ITERATOR_BASE + */ +typedef struct cx_iterator_base_s CxIteratorBase; + +/** * Declares base attributes for an iterator. * Must be the first member of an iterator structure. */ @@ -186,7 +192,7 @@ * This is useful for APIs that expect some iterator as an argument. * * @param iter the iterator - * @return (@c CxIterator*) a pointer to the iterator + * @return (@c struct @c cx_iterator_base_s*) a pointer to the iterator */ #define cxIteratorRef(iter) &((iter).base)
--- a/src/cx/tree.h Sun Feb 16 12:15:27 2025 +0100 +++ b/src/cx/tree.h Sun Feb 16 12:17:18 2025 +0100 @@ -1081,7 +1081,7 @@ cx_attr_nonnull static inline size_t cxTreeInsertIter( CxTree *tree, - struct cx_iterator_base_s *iter, + CxIteratorBase *iter, size_t n ) { return tree->cl->insert_many(tree, iter, n);