26 * POSSIBILITY OF SUCH DAMAGE. |
26 * POSSIBILITY OF SUCH DAMAGE. |
27 */ |
27 */ |
28 |
28 |
29 #include "avl.h" |
29 #include "avl.h" |
30 |
30 |
|
31 UcxAVLTree *ucx_avl_new(cmp_func cmpfunc) { |
|
32 return ucx_avl_new_a(cmpfunc, ucx_default_allocator()); |
|
33 } |
|
34 |
|
35 UcxAVLTree *ucx_avl_new_a(cmp_func cmpfunc, UcxAllocator *allocator) { |
|
36 UcxAVLTree *tree = malloc(sizeof(UcxAVLTree)); |
|
37 if (tree) { |
|
38 tree->allocator = allocator; |
|
39 tree->cmpfunc = cmpfunc; |
|
40 tree->root = NULL; |
|
41 tree->userdata = NULL; |
|
42 } |
|
43 |
|
44 return tree; |
|
45 } |
|
46 |
|
47 void *ucx_avl_get(UcxAVLTree *tree, intptr_t key) { |
|
48 return NULL; |
|
49 } |
|
50 |
|
51 void* ucx_avl_put(UcxAVLTree *tree, intptr_t key, void *value) { |
|
52 return NULL; |
|
53 } |
|
54 |
|
55 void* ucx_avl_remove(UcxAVLTree *tree, intptr_t key) { |
|
56 return NULL; |
|
57 } |
|
58 |