ucx/cx/array_list.h

changeset 1034
330b415910bd
parent 1016
ccde46662db7
--- a/ucx/cx/array_list.h	Mon Dec 29 17:46:10 2025 +0100
+++ b/ucx/cx/array_list.h	Wed Dec 31 09:16:02 2025 +0100
@@ -280,12 +280,12 @@
  *
  * @param allocator (@c CxAllocator*) the allocator to use for a possible reallocation
  * @param array the name of the array where the element shall be added
- * @param element (@c void*) a pointer to the element that shall be added
+ * @param element the element that shall be added
  * @retval zero success
  * @retval non-zero a re-allocation was necessary but failed
  */
 #define cx_array_add_a(allocator, array, element) \
-        cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), (array).size, element, 1)
+        cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), (array).size, (void*)&(element), 1)
 
 /**
  * Appends an element to an array.
@@ -308,12 +308,12 @@
  * @param allocator (@c CxAllocator*) the allocator to use for a possible reallocation
  * @param array the name of the array where the element shall be inserted
  * @param index (@c size_t) the index where to insert the @p element
- * @param element (@c void*) a pointer to the element that shall be inserted
+ * @param element the element that shall be inserted
  * @retval zero success
  * @retval non-zero a re-allocation was necessary but failed
  */
 #define cx_array_insert_a(allocator, array, index, element) \
-        cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), index, element, 1)
+        cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), index, (void*)&(element), 1)
 
 /**
  * Inserts an element into an array.

mercurial