1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

change tree to use qsort_cmp2 - compare function with 3 instead of 2 arguments

This commit is contained in:
sasha@mysql.sashanet.com
2001-05-10 18:14:15 -06:00
parent 15df552e99
commit a12117f036
10 changed files with 74 additions and 20 deletions

View File

@ -50,7 +50,8 @@ typedef struct st_tree {
TREE_ELEMENT *root,null_element;
TREE_ELEMENT **parents[MAX_TREE_HIGHT];
uint offset_to_key,elements_in_tree,size_of_element;
qsort_cmp compare;
qsort_cmp2 compare;
void* cmp_arg;
MEM_ROOT mem_root;
my_bool with_delete;
void (*free)(void *);
@ -58,7 +59,7 @@ typedef struct st_tree {
/* Functions on hole tree */
void init_tree(TREE *tree,uint default_alloc_size, int element_size,
qsort_cmp compare, my_bool with_delete,
qsort_cmp2 compare, my_bool with_delete,
void (*free_element)(void*));
void delete_tree(TREE*);
#define is_tree_inited(tree) ((tree)->root != 0)