# HG changeset patch # User Mike Becker # Date 1432047688 -7200 # Node ID 54a7ceb9151f38b451f6985b2a204eb592bf3c07 # Parent 4477987d40cd48a6071dfe8ac0608e4d2a1ea034 improved avl function names diff -r 4477987d40cd -r 54a7ceb9151f ucx/avl.c --- 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); } diff -r 4477987d40cd -r 54a7ceb9151f ucx/avl.h --- 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 NULL, 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.