ucx/cx/iterator.h

branch
dav-2
changeset 894
e86049631677
parent 891
4d58cbcc9efa
--- a/ucx/cx/iterator.h	Tue Dec 30 21:39:38 2025 +0100
+++ b/ucx/cx/iterator.h	Wed Dec 31 16:41:16 2025 +0100
@@ -38,10 +38,6 @@
 
 #include "common.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Common data for all iterators.
  */
@@ -183,16 +179,6 @@
 #define cxIteratorFlagRemoval(iter) ((iter).base.remove = (iter).base.allow_remove)
 
 /**
- * Obtains a reference to an arbitrary iterator.
- *
- * This is useful for APIs that expect some iterator as an argument.
- *
- * @param iter the iterator
- * @return (@c struct @c cx_iterator_base_s*) a pointer to the iterator
- */
-#define cxIteratorRef(iter) &((iter).base)
-
-/**
  * Loops over an iterator.
  *
  * @param type the type of the elements
@@ -220,8 +206,8 @@
  * @return an iterator for the specified array
  * @see cxIteratorPtr()
  */
-cx_attr_nodiscard
-CX_EXPORT CxIterator cxIterator(const void *array,
+CX_EXTERN CX_NODISCARD
+CxIterator cxIterator(const void *array,
         size_t elem_size, size_t elem_count);
 
 /**
@@ -237,11 +223,7 @@
  * @return an iterator for the specified array
  * @see cxIterator()
  */
-cx_attr_nodiscard
-CX_EXPORT CxIterator cxIteratorPtr(const void *array, size_t elem_count);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+CX_EXTERN CX_NODISCARD
+CxIterator cxIteratorPtr(const void *array, size_t elem_count);
 
 #endif // UCX_ITERATOR_H

mercurial