src/cx/linked_list.h

changeset 508
8aea65ae1eaf
parent 503
a89857072ace
child 526
b070ef465313
     1.1 --- a/src/cx/linked_list.h	Sun Mar 06 13:57:36 2022 +0100
     1.2 +++ b/src/cx/linked_list.h	Sat Apr 09 16:37:43 2022 +0200
     1.3 @@ -56,7 +56,7 @@
     1.4   * @return the created list
     1.5   */
     1.6  CxList *cxLinkedListCreate(
     1.7 -        CxAllocator *allocator,
     1.8 +        CxAllocator const *allocator,
     1.9          CxListComparator comparator,
    1.10          size_t item_size
    1.11  ) __attribute__((__nonnull__));
    1.12 @@ -71,7 +71,7 @@
    1.13   * @return the created list
    1.14   */
    1.15  CxList *cxPointerLinkedListCreate(
    1.16 -        CxAllocator *allocator,
    1.17 +        CxAllocator const *allocator,
    1.18          CxListComparator comparator
    1.19  ) __attribute__((__nonnull__));
    1.20  
    1.21 @@ -86,7 +86,7 @@
    1.22   * @return the created list
    1.23   */
    1.24  CxList *cxLinkedListFromArray(
    1.25 -        CxAllocator *allocator,
    1.26 +        CxAllocator const *allocator,
    1.27          CxListComparator comparator,
    1.28          size_t item_size,
    1.29          size_t num_items,
    1.30 @@ -111,7 +111,7 @@
    1.31   * @return the node found at the specified index
    1.32   */
    1.33  void *cx_linked_list_at(
    1.34 -        void *start,
    1.35 +        void const *start,
    1.36          size_t start_index,
    1.37          ptrdiff_t loc_advance,
    1.38          size_t index
    1.39 @@ -150,7 +150,7 @@
    1.40   * @return a pointer to the first node
    1.41   */
    1.42  void *cx_linked_list_first(
    1.43 -        void *node,
    1.44 +        void const *node,
    1.45          ptrdiff_t loc_prev
    1.46  ) __attribute__((__nonnull__));
    1.47  
    1.48 @@ -166,7 +166,7 @@
    1.49   * @return a pointer to the last node
    1.50   */
    1.51  void *cx_linked_list_last(
    1.52 -        void *node,
    1.53 +        void const *node,
    1.54          ptrdiff_t loc_next
    1.55  ) __attribute__((__nonnull__));
    1.56  
    1.57 @@ -181,9 +181,9 @@
    1.58   * @return the node or \c NULL if \p node has no predecessor
    1.59   */
    1.60  void *cx_linked_list_prev(
    1.61 -        void *begin,
    1.62 +        void const *begin,
    1.63          ptrdiff_t loc_next,
    1.64 -        void *node
    1.65 +        void const *node
    1.66  ) __attribute__((__nonnull__));
    1.67  
    1.68  /**

mercurial