--- a/src/cx/tree.h Mon Feb 10 21:30:51 2025 +0100 +++ b/src/cx/tree.h Mon Feb 10 20:59:02 2025 +0100 @@ -263,6 +263,7 @@ * @see cx_tree_unlink() */ cx_attr_nonnull +cx_attr_export void cx_tree_link( void *parent, void *node, @@ -288,6 +289,7 @@ * @see cx_tree_link() */ cx_attr_nonnull +cx_attr_export void cx_tree_unlink( void *node, ptrdiff_t loc_parent, @@ -387,6 +389,7 @@ */ cx_attr_nonnull cx_attr_access_w(5) +cx_attr_export int cx_tree_search_data( const void *root, size_t depth, @@ -423,6 +426,7 @@ */ cx_attr_nonnull cx_attr_access_w(5) +cx_attr_export int cx_tree_search( const void *root, size_t depth, @@ -454,6 +458,7 @@ * @see cxTreeIteratorDispose() */ cx_attr_nodiscard +cx_attr_export CxTreeIterator cx_tree_iterator( void *root, bool visit_on_exit, @@ -480,6 +485,7 @@ * @see cxTreeVisitorDispose() */ cx_attr_nodiscard +cx_attr_export CxTreeVisitor cx_tree_visitor( void *root, ptrdiff_t loc_children, @@ -505,6 +511,7 @@ * This variable is used by #cx_tree_add_array() and #cx_tree_add_iter() to * implement optimized insertion of multiple elements into a tree. */ +cx_attr_export extern unsigned int cx_tree_add_look_around_depth; /** @@ -547,6 +554,7 @@ */ cx_attr_nonnull_arg(1, 3, 4, 6, 7) cx_attr_access_w(6) +cx_attr_export size_t cx_tree_add_iter( struct cx_iterator_base_s *iter, size_t num, @@ -601,6 +609,7 @@ */ cx_attr_nonnull_arg(1, 4, 5, 7, 8) cx_attr_access_w(7) +cx_attr_export size_t cx_tree_add_array( const void *src, size_t num, @@ -664,6 +673,7 @@ */ cx_attr_nonnull_arg(1, 2, 3, 5, 6) cx_attr_access_w(5) +cx_attr_export int cx_tree_add( const void *src, cx_tree_search_func sfunc, @@ -894,6 +904,7 @@ * @see cxTreeFree() */ cx_attr_nonnull +cx_attr_export void cxTreeDestroySubtree(CxTree *tree, void *node); @@ -932,6 +943,7 @@ * * @param tree the tree to free */ +cx_attr_export void cxTreeFree(CxTree *tree); /** @@ -962,6 +974,7 @@ cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxTreeFree, 1) +cx_attr_export CxTree *cxTreeCreate( const CxAllocator *allocator, cx_tree_node_create_func create_func, @@ -1022,6 +1035,7 @@ cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxTreeFree, 1) +cx_attr_export CxTree *cxTreeCreateWrapped( const CxAllocator *allocator, void *root, @@ -1158,6 +1172,7 @@ */ cx_attr_nonnull cx_attr_nodiscard +cx_attr_export size_t cxTreeSubtreeSize(CxTree *tree, void *subtree_root); /** @@ -1169,6 +1184,7 @@ */ cx_attr_nonnull cx_attr_nodiscard +cx_attr_export size_t cxTreeSubtreeDepth(CxTree *tree, void *subtree_root); /** @@ -1179,6 +1195,7 @@ */ cx_attr_nonnull cx_attr_nodiscard +cx_attr_export size_t cxTreeDepth(CxTree *tree); /** @@ -1267,6 +1284,7 @@ * @see cxTreeAddChildNode() */ cx_attr_nonnull +cx_attr_export void cxTreeSetParent( CxTree *tree, void *parent, @@ -1289,6 +1307,7 @@ * @see cxTreeSetParent() */ cx_attr_nonnull +cx_attr_export void cxTreeAddChildNode( CxTree *tree, void *parent, @@ -1313,6 +1332,7 @@ * @see cxTreeInsert() */ cx_attr_nonnull +cx_attr_export int cxTreeAddChild( CxTree *tree, void *parent, @@ -1353,6 +1373,7 @@ * @return zero on success, non-zero if @p node is the root node of the tree */ cx_attr_nonnull_arg(1, 2) +cx_attr_export int cxTreeRemoveNode( CxTree *tree, void *node, @@ -1371,6 +1392,7 @@ * @param node the node to remove */ cx_attr_nonnull +cx_attr_export void cxTreeRemoveSubtree(CxTree *tree, void *node); /** @@ -1392,6 +1414,7 @@ * @return zero on success, non-zero if @p node is the root node of the tree */ cx_attr_nonnull_arg(1, 2) +cx_attr_export int cxTreeDestroyNode( CxTree *tree, void *node,