1.1 --- a/ucx/avl.c Sun May 17 17:59:07 2015 +0200 1.2 +++ b/ucx/avl.c Sun May 17 18:32:41 2015 +0200 1.3 @@ -28,3 +28,31 @@ 1.4 1.5 #include "avl.h" 1.6 1.7 +UcxAVLTree *ucx_avl_new(cmp_func cmpfunc) { 1.8 + return ucx_avl_new_a(cmpfunc, ucx_default_allocator()); 1.9 +} 1.10 + 1.11 +UcxAVLTree *ucx_avl_new_a(cmp_func cmpfunc, UcxAllocator *allocator) { 1.12 + UcxAVLTree *tree = malloc(sizeof(UcxAVLTree)); 1.13 + if (tree) { 1.14 + tree->allocator = allocator; 1.15 + tree->cmpfunc = cmpfunc; 1.16 + tree->root = NULL; 1.17 + tree->userdata = NULL; 1.18 + } 1.19 + 1.20 + return tree; 1.21 +} 1.22 + 1.23 +void *ucx_avl_get(UcxAVLTree *tree, intptr_t key) { 1.24 + return NULL; 1.25 +} 1.26 + 1.27 +void* ucx_avl_put(UcxAVLTree *tree, intptr_t key, void *value) { 1.28 + return NULL; 1.29 +} 1.30 + 1.31 +void* ucx_avl_remove(UcxAVLTree *tree, intptr_t key) { 1.32 + return NULL; 1.33 +} 1.34 +