btree: fix bad function name expansion in BTREE_DEFINE_SIMPLE_GET()

This commit is contained in:
2023-03-09 19:55:26 +00:00
parent 079941f3f9
commit f2b929e52e

View File

@@ -189,7 +189,7 @@
Which would emit a function defined like:
static void my_tree_node_get(btree_t *tree, int key);
static struct my_tree_node *my_tree_node_get(btree_t *tree, int key);
@param node_type your custom tree node type. usually a structure that contains a btree_node_t member.
@param key_type the type name of the key embedded in your custom tree node type. this type must be
@@ -199,7 +199,7 @@
@param function_name the name of the function to generate.
*/
#define BTREE_DEFINE_SIMPLE_GET(node_type, key_type, container_node_member, container_key_member, function_name) \
node_type *get(btree_t *tree, key_type key) \
node_type *function_name(btree_t *tree, key_type key) \
{ \
btree_node_t *cur = tree->b_root; \
while (cur) { \