cleanup: make TREE copyable

move per-object TREE::null_element to be one global
static null_element.
This commit is contained in:
Sergei Golubchik 2017-06-21 14:36:29 +02:00
parent bed1ede197
commit 6cc19078ba
2 changed files with 23 additions and 25 deletions

View file

@ -59,7 +59,7 @@ typedef struct st_tree_element {
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
typedef struct st_tree {
TREE_ELEMENT *root,null_element;
TREE_ELEMENT *root;
TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
uint offset_to_key,elements_in_tree,size_of_element;
size_t memory_limit, allocated;