diff --git a/doc/API.txt b/doc/API.txt index 6db2c89a..86c5bb0d 100644 --- a/doc/API.txt +++ b/doc/API.txt @@ -6,4 +6,5 @@ V0.1.*: * First formal version of API V0.2.*: * worker_sync takes a 'worker_t' as an additional parameter (This allows to perform a wait-on-event instead of a busy waiting). * worker_init takes an int as numWorker instead of an unsingned int. - + * RBTREE pop method has been renamed into _pop_at + diff --git a/m-rbtree.h b/m-rbtree.h index e5713e53..1c2bffe0 100644 --- a/m-rbtree.h +++ b/m-rbtree.h @@ -72,7 +72,6 @@ IT_CREF(M_C(name,_cref)), \ CLEAN(M_C(name,_clean)), \ PUSH(M_C(name,_push)), \ - POP(M_C(name,_pop)) \ GET_MIN(M_C(name,_min)), \ GET_MAX(M_C(name,_max)), \ M_IF_METHOD(GET_STR, oplist)(GET_STR(M_C(name, _get_str)),), \ @@ -685,7 +684,7 @@ typedef enum { ) \ \ static inline bool \ - M_C(name, _pop)(type *data_ptr, tree_t tree, type const key) \ + M_C(name, _pop_at)(type *data_ptr, tree_t tree, type const key) \ { \ RBTREEI_CONTRACT (tree); \ node_t *tab[RBTREEI_MAX_STACK]; \ diff --git a/tests/test-mrbtree.c b/tests/test-mrbtree.c index 296c41f0..84d5ff59 100644 --- a/tests/test-mrbtree.c +++ b/tests/test-mrbtree.c @@ -135,16 +135,16 @@ static void test_uint(void) assert (*cptr == num/2); rbtree_uint_clear(tree); - bool b = rbtree_uint_pop(NULL, tree2, num+1); + bool b = rbtree_uint_pop_at(NULL, tree2, num+1); assert (b == false); for(unsigned int i = 0; i < num; i+=3) { - b = rbtree_uint_pop(NULL, tree2, i); + b = rbtree_uint_pop_at(NULL, tree2, i); assert(b); ptr = rbtree_uint_get(tree2, i); assert (ptr == NULL); } for(unsigned int i = 1; i < num; i+=3) { - b = rbtree_uint_pop(NULL, tree2, i); + b = rbtree_uint_pop_at(NULL, tree2, i); assert(b); ptr = rbtree_uint_get(tree2, i); assert (ptr == NULL);