diff -r 12315ee158ad -r 72ad8a78378a src/cx/tree.h --- a/src/cx/tree.h Sat Dec 06 17:51:08 2025 +0100 +++ b/src/cx/tree.h Sat Dec 06 18:01:52 2025 +0100 @@ -643,17 +643,13 @@ * Structure for holding the base data of a tree. */ struct cx_tree_s { + CX_COLLECTION_BASE; /** * The tree class definition. */ const cx_tree_class *cl; /** - * Allocator to allocate new nodes. - */ - const CxAllocator *allocator; - - /** * A pointer to the root node. * * Will be @c NULL when @c size is 0. @@ -671,21 +667,6 @@ cx_tree_node_create_func node_create; /** - * An optional simple destructor for the tree nodes. - */ - cx_destructor_func simple_destructor; - - /** - * An optional advanced destructor for the tree nodes. - */ - cx_destructor_func2 advanced_destructor; - - /** - * The pointer to additional data that is passed to the advanced destructor. - */ - void *destructor_data; - - /** * A function to compare two nodes. */ cx_tree_search_func search; @@ -696,11 +677,6 @@ cx_tree_search_data_func search_data; /** - * The number of currently stored elements. - */ - size_t size; - - /** * Offset in the node struct for the parent pointer. */ ptrdiff_t loc_parent;