src/cx/linked_list.h

changeset 890
54565fd74e74
parent 879
9c24a4eb5ac9
child 891
49d8cff6f0ee
--- a/src/cx/linked_list.h	Wed Sep 18 00:02:18 2024 +0200
+++ b/src/cx/linked_list.h	Sat Sep 28 15:47:28 2024 +0200
@@ -65,7 +65,7 @@
  * @return the created list
  */
 CxList *cxLinkedListCreate(
-        CxAllocator const *allocator,
+        const CxAllocator *allocator,
         cx_compare_func comparator,
         size_t elem_size
 );
@@ -105,7 +105,7 @@
  * @return the node found at the specified index
  */
 void *cx_linked_list_at(
-        void const *start,
+        const void *start,
         size_t start_index,
         ptrdiff_t loc_advance,
         size_t index
@@ -122,11 +122,11 @@
  * @return the index of the element or a negative value if it could not be found
  */
 ssize_t cx_linked_list_find(
-        void const *start,
+        const void *start,
         ptrdiff_t loc_advance,
         ptrdiff_t loc_data,
         cx_compare_func cmp_func,
-        void const *elem
+        const void *elem
 ) __attribute__((__nonnull__));
 
 /**
@@ -143,11 +143,11 @@
  */
 ssize_t cx_linked_list_find_node(
         void **result,
-        void const *start,
+        const void *start,
         ptrdiff_t loc_advance,
         ptrdiff_t loc_data,
         cx_compare_func cmp_func,
-        void const *elem
+        const void *elem
 ) __attribute__((__nonnull__));
 
 /**
@@ -162,7 +162,7 @@
  * @return a pointer to the first node
  */
 void *cx_linked_list_first(
-        void const *node,
+        const void *node,
         ptrdiff_t loc_prev
 ) __attribute__((__nonnull__));
 
@@ -178,7 +178,7 @@
  * @return a pointer to the last node
  */
 void *cx_linked_list_last(
-        void const *node,
+        const void *node,
         ptrdiff_t loc_next
 ) __attribute__((__nonnull__));
 
@@ -193,9 +193,9 @@
  * @return the node or \c NULL if \p node has no predecessor
  */
 void *cx_linked_list_prev(
-        void const *begin,
+        const void *begin,
         ptrdiff_t loc_next,
-        void const *node
+        const void *node
 ) __attribute__((__nonnull__));
 
 /**
@@ -409,7 +409,7 @@
  * @return the size of the list or zero if \p node is \c NULL
  */
 size_t cx_linked_list_size(
-        void const *node,
+        const void *node,
         ptrdiff_t loc_next
 );
 
@@ -459,8 +459,8 @@
  * right list, positive if the left list is larger than the right list, zero if both lists are equal.
  */
 int cx_linked_list_compare(
-        void const *begin_left,
-        void const *begin_right,
+        const void *begin_left,
+        const void *begin_right,
         ptrdiff_t loc_advance,
         ptrdiff_t loc_data,
         cx_compare_func cmp_func

mercurial