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 |
1.1 --- a/ucx/avl.c Tue May 19 16:47:54 2015 +0200 1.2 +++ b/ucx/avl.c Tue May 19 17:01:28 2015 +0200 1.3 @@ -132,7 +132,7 @@ 1.4 alfree(al, tree); 1.5 } 1.6 1.7 -UcxAVLNode *ucx_avl_getn(UcxAVLTree *tree, intptr_t key) { 1.8 +UcxAVLNode *ucx_avl_get_node(UcxAVLTree *tree, intptr_t key) { 1.9 UcxAVLNode *n = tree->root; 1.10 int cmpresult; 1.11 while (n && (cmpresult = tree->cmpfunc( 1.12 @@ -143,7 +143,7 @@ 1.13 } 1.14 1.15 void *ucx_avl_get(UcxAVLTree *tree, intptr_t key) { 1.16 - UcxAVLNode *n = ucx_avl_getn(tree, key); 1.17 + UcxAVLNode *n = ucx_avl_get_node(tree, key); 1.18 return n ? n->value : NULL; 1.19 } 1.20 1.21 @@ -206,7 +206,7 @@ 1.22 return ucx_avl_remove_s(tree, key, NULL, NULL); 1.23 } 1.24 1.25 -int ucx_avl_remove_n(UcxAVLTree *tree, UcxAVLNode *node) { 1.26 +int ucx_avl_remove_node(UcxAVLTree *tree, UcxAVLNode *node) { 1.27 return ucx_avl_remove_s(tree, node->key, NULL, NULL); 1.28 } 1.29
2.1 --- a/ucx/avl.h Tue May 19 16:47:54 2015 +0200 2.2 +++ b/ucx/avl.h Tue May 19 17:01:28 2015 +0200 2.3 @@ -153,7 +153,7 @@ 2.4 * @param key the key 2.5 * @return the node (or <code>NULL</code>, if the key is not present) 2.6 */ 2.7 -UcxAVLNode *ucx_avl_getn(UcxAVLTree *tree, intptr_t key); 2.8 +UcxAVLNode *ucx_avl_get_node(UcxAVLTree *tree, intptr_t key); 2.9 2.10 /** 2.11 * Gets the value from the tree, that is associated with the specified key. 2.12 @@ -202,7 +202,7 @@ 2.13 * @param node the node to remove 2.14 * @return zero, if and only if an element has been removed 2.15 */ 2.16 -int ucx_avl_remove_n(UcxAVLTree *tree, UcxAVLNode *node); 2.17 +int ucx_avl_remove_node(UcxAVLTree *tree, UcxAVLNode *node); 2.18 2.19 /** 2.20 * Removes an element from the AVL tree.