src/cx/tree.h

changeset 890
54565fd74e74
parent 871
e29c1f96646d
--- a/src/cx/tree.h	Wed Sep 18 00:02:18 2024 +0200
+++ b/src/cx/tree.h	Sat Sep 28 15:47:28 2024 +0200
@@ -321,7 +321,7 @@
  * positive if one of the children might contain the data,
  * negative if neither the node, nor the children contains the data
  */
-typedef int (*cx_tree_search_data_func)(void const *node, void const *data);
+typedef int (*cx_tree_search_data_func)(const void *node, const void *data);
 
 
 /**
@@ -348,7 +348,7 @@
  * positive if one of the children might contain the data,
  * negative if neither the node, nor the children contains the data
  */
-typedef int (*cx_tree_search_func)(void const *node, void const *new_node);
+typedef int (*cx_tree_search_func)(const void *node, const void *new_node);
 
 /**
  * Searches for data in a tree.
@@ -375,8 +375,8 @@
  */
 __attribute__((__nonnull__))
 int cx_tree_search_data(
-        void const *root,
-        void const *data,
+        const void *root,
+        const void *data,
         cx_tree_search_data_func sfunc,
         void **result,
         ptrdiff_t loc_children,
@@ -408,8 +408,8 @@
  */
 __attribute__((__nonnull__))
 int cx_tree_search(
-        void const *root,
-        void const *node,
+        const void *root,
+        const void *node,
         cx_tree_search_func sfunc,
         void **result,
         ptrdiff_t loc_children,
@@ -479,7 +479,7 @@
  * \note the function may leave the node pointers in the struct uninitialized.
  * The caller is responsible to set them according to the intended use case.
  */
-typedef void *(*cx_tree_node_create_func)(void const *, void *);
+typedef void *(*cx_tree_node_create_func)(const void *, void *);
 
 /**
  * The local search depth for a new subtree when adding multiple elements.
@@ -580,7 +580,7 @@
  */
 __attribute__((__nonnull__(1, 4, 5, 7, 8)))
 size_t cx_tree_add_array(
-        void const *src,
+        const void *src,
         size_t num,
         size_t elem_size,
         cx_tree_search_func sfunc,
@@ -642,7 +642,7 @@
  */
 __attribute__((__nonnull__(1, 2, 3, 5, 6)))
 int cx_tree_add(
-        void const *src,
+        const void *src,
         cx_tree_search_func sfunc,
         cx_tree_node_create_func cfunc,
         void *cdata,

mercurial