ucx/cx/iterator.h

changeset 1040
473d8cb58a6c
parent 1016
ccde46662db7
--- a/ucx/cx/iterator.h	Wed Dec 31 12:37:09 2025 +0100
+++ b/ucx/cx/iterator.h	Wed Dec 31 16:40:12 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