Tue, 19 May 2015 17:01:28 +0200
improved avl function names
ucx/avl.c | file | annotate | diff | comparison | revisions | |
ucx/avl.h | file | annotate | diff | comparison | revisions |
--- a/ucx/avl.c Tue May 19 16:47:54 2015 +0200 +++ b/ucx/avl.c Tue May 19 17:01:28 2015 +0200 @@ -132,7 +132,7 @@ alfree(al, tree); } -UcxAVLNode *ucx_avl_getn(UcxAVLTree *tree, intptr_t key) { +UcxAVLNode *ucx_avl_get_node(UcxAVLTree *tree, intptr_t key) { UcxAVLNode *n = tree->root; int cmpresult; while (n && (cmpresult = tree->cmpfunc( @@ -143,7 +143,7 @@ } void *ucx_avl_get(UcxAVLTree *tree, intptr_t key) { - UcxAVLNode *n = ucx_avl_getn(tree, key); + UcxAVLNode *n = ucx_avl_get_node(tree, key); return n ? n->value : NULL; } @@ -206,7 +206,7 @@ return ucx_avl_remove_s(tree, key, NULL, NULL); } -int ucx_avl_remove_n(UcxAVLTree *tree, UcxAVLNode *node) { +int ucx_avl_remove_node(UcxAVLTree *tree, UcxAVLNode *node) { return ucx_avl_remove_s(tree, node->key, NULL, NULL); }
--- a/ucx/avl.h Tue May 19 16:47:54 2015 +0200 +++ b/ucx/avl.h Tue May 19 17:01:28 2015 +0200 @@ -153,7 +153,7 @@ * @param key the key * @return the node (or <code>NULL</code>, if the key is not present) */ -UcxAVLNode *ucx_avl_getn(UcxAVLTree *tree, intptr_t key); +UcxAVLNode *ucx_avl_get_node(UcxAVLTree *tree, intptr_t key); /** * Gets the value from the tree, that is associated with the specified key. @@ -202,7 +202,7 @@ * @param node the node to remove * @return zero, if and only if an element has been removed */ -int ucx_avl_remove_n(UcxAVLTree *tree, UcxAVLNode *node); +int ucx_avl_remove_node(UcxAVLTree *tree, UcxAVLNode *node); /** * Removes an element from the AVL tree.