src/cx/linked_list.h

changeset 489
af6be1e123aa
parent 488
9138acaa494b
child 500
eb9e7bd40a8e
     1.1 --- a/src/cx/linked_list.h	Tue Dec 28 17:24:18 2021 +0100
     1.2 +++ b/src/cx/linked_list.h	Tue Dec 28 17:38:02 2021 +0100
     1.3 @@ -90,7 +90,7 @@
     1.4          CxListComparator comparator,
     1.5          size_t item_size,
     1.6          size_t num_items,
     1.7 -        const void *array
     1.8 +        void const *array
     1.9  ) __attribute__((__nonnull__));
    1.10  
    1.11  /**
    1.12 @@ -139,12 +139,12 @@
    1.13   * @return the index of the element or a past-one index if the element could not be found
    1.14   */
    1.15  size_t cx_linked_list_find(
    1.16 -        void *start,
    1.17 +        void const *start,
    1.18          ptrdiff_t loc_advance,
    1.19          ptrdiff_t loc_data,
    1.20          bool follow_ptr,
    1.21          CxListComparator cmp_func,
    1.22 -        void *elem
    1.23 +        void const *elem
    1.24  ) __attribute__((__nonnull__));
    1.25  
    1.26  /**
    1.27 @@ -355,7 +355,7 @@
    1.28   * @return the size of the list or zero if \p node is \c NULL
    1.29   */
    1.30  size_t cx_linked_list_size(
    1.31 -        void *node,
    1.32 +        void const *node,
    1.33          ptrdiff_t loc_next
    1.34  );
    1.35  
    1.36 @@ -416,8 +416,8 @@
    1.37   * @return
    1.38   */
    1.39  int cx_linked_list_compare(
    1.40 -        void *begin_left,
    1.41 -        void *begin_right,
    1.42 +        void const *begin_left,
    1.43 +        void const *begin_right,
    1.44          ptrdiff_t loc_advance,
    1.45          ptrdiff_t loc_data,
    1.46          bool follow_ptr,

mercurial