src/cx/tree.h

branch
feature/tree_add
changeset 865
4b325b639117
parent 864
7d3061f212cb
child 867
471c714d5b6f
equal deleted inserted replaced
864:7d3061f212cb 865:4b325b639117
420 * created node, a pointer to the existing node, or \c NULL when allocation 420 * created node, a pointer to the existing node, or \c NULL when allocation
421 * fails. 421 * fails.
422 * Returning a pointer to the existing node means, that the function decides 422 * Returning a pointer to the existing node means, that the function decides
423 * not to create a new node for the data and that the caller shall continue to 423 * not to create a new node for the data and that the caller shall continue to
424 * use the existing node. 424 * use the existing node.
425 */ 425 *
426 typedef void (*cx_tree_node_create_func)(void const *, void const *, void *); 426 * \note the function may leave the node pointers in the struct uninitialized.
427 * The caller is responsible to set them according to where the node will be
428 * added to the tree.
429 */
430 typedef void *(*cx_tree_node_create_func)(void const *, void const *, void *);
427 431
428 /** 432 /**
429 * The local search depth for a new subtree when adding multiple elements. 433 * The local search depth for a new subtree when adding multiple elements.
430 * The default value is 3. 434 * The default value is 3.
431 * This variable is used by #cx_tree_add_array() and #cx_tree_add_iter() to 435 * This variable is used by #cx_tree_add_array() and #cx_tree_add_iter() to

mercurial