7.4 Creation [ToC] [Index]     [Skip Back] [Skip Fwd]     [Prev] [Up] [Next]

Function tbst_create() is the same as bst_create() except that a struct tbst_table has no generation number to fill in.

254. <TBST creation function 254> =
struct tbst_table *
tbst_create (tbst_comparison_func *compare, void *param, struct libavl_allocator *allocator)
{ struct tbst_table *tree; assert (compare != NULL); if (allocator == NULL) allocator = &tbst_allocator_default; tree = allocator->libavl_malloc (allocator, sizeof *tree); if (tree == NULL) return NULL; tree->tbst_root = NULL; tree->tbst_compare = compare; tree->tbst_param = param; tree->tbst_alloc = allocator; tree->tbst_count = 0; return tree; }

This code is included in 253, 302, 338, 377, 420, 457, 491, 524, and 556.