fix return type of cx_tree_node_create_func feature/tree_add

Mon, 19 Aug 2024 18:46:49 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 19 Aug 2024 18:46:49 +0200
branch
feature/tree_add
changeset 865
4b325b639117
parent 864
7d3061f212cb
child 866
1f636de4a63f

fix return type of cx_tree_node_create_func

relates to #390

src/cx/tree.h file | annotate | diff | comparison | revisions
--- a/src/cx/tree.h	Sun Aug 18 11:26:34 2024 +0200
+++ b/src/cx/tree.h	Mon Aug 19 18:46:49 2024 +0200
@@ -422,8 +422,12 @@
  * Returning a pointer to the existing node means, that the function decides
  * not to create a new node for the data and that the caller shall continue to
  * use the existing node.
+ *
+ * \note the function may leave the node pointers in the struct uninitialized.
+ * The caller is responsible to set them according to where the node will be
+ * added to the tree.
  */
-typedef void (*cx_tree_node_create_func)(void const *, void const *, void *);
+typedef void *(*cx_tree_node_create_func)(void const *, void const *, void *);
 
 /**
  * The local search depth for a new subtree when adding multiple elements.

mercurial