Finished moving obiblob functions to obiblob files and documentation for
obiblob functions
This commit is contained in:
14
src/obiavl.c
14
src/obiavl.c
@ -951,7 +951,7 @@ int add_new_avl_in_group(OBIDMS_avl_group_p avl_group)
|
||||
|
||||
int maybe_in_avl(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
{
|
||||
return (bloom_check(&((avl->header)->bloom_filter), value, blob_sizeof(value)));
|
||||
return (bloom_check(&((avl->header)->bloom_filter), value, obi_blob_sizeof(value)));
|
||||
}
|
||||
|
||||
|
||||
@ -963,7 +963,7 @@ index_t avl_add_value_in_data_array(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
value_idx = ((avl->data)->header)->data_size_used;
|
||||
|
||||
// Grow the data if needed
|
||||
value_size = blob_sizeof(value);
|
||||
value_size = obi_blob_sizeof(value);
|
||||
while (((avl->data)->header)->data_size_max < (value_idx + value_size))
|
||||
{
|
||||
if (grow_avl_data(avl->data) < 0)
|
||||
@ -1978,7 +1978,7 @@ index_t obi_avl_add(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
|
||||
n = 0;
|
||||
depth = 0;
|
||||
crc = crc64((byte_t*)value, blob_sizeof(value));
|
||||
crc = crc64((byte_t*)value, obi_blob_sizeof(value));
|
||||
|
||||
// Check if first node
|
||||
if (!((avl->header)->nb_items))
|
||||
@ -2025,7 +2025,7 @@ index_t obi_avl_add(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
if (comp == 0)
|
||||
{ // check if really same value
|
||||
to_compare = obi_avl_get(avl, current_node->value);
|
||||
comp = blob_compare(to_compare, value);
|
||||
comp = obi_blob_compare(to_compare, value);
|
||||
}
|
||||
|
||||
if (comp > 0)
|
||||
@ -2107,7 +2107,7 @@ index_t obi_avl_find(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
AVL_node_p current_node;
|
||||
uint64_t crc;
|
||||
|
||||
crc = crc64((byte_t*)value, blob_sizeof(value));
|
||||
crc = crc64((byte_t*)value, obi_blob_sizeof(value));
|
||||
|
||||
next = (avl->header)->root_idx;
|
||||
while (next != -1)
|
||||
@ -2120,7 +2120,7 @@ index_t obi_avl_find(OBIDMS_avl_p avl, Obi_blob_p value)
|
||||
if (comp == 0)
|
||||
{ // Check if really same value
|
||||
to_compare = obi_avl_get(avl, current_node->value);
|
||||
comp = blob_compare(to_compare, value);
|
||||
comp = obi_blob_compare(to_compare, value);
|
||||
}
|
||||
|
||||
if (comp > 0)
|
||||
@ -2205,7 +2205,7 @@ index_t obi_avl_group_add(OBIDMS_avl_group_p avl_group, Obi_blob_p value)
|
||||
}
|
||||
|
||||
// Add in the current AVL
|
||||
bloom_add(&((((avl_group->sub_avls)[avl_group->current_avl_idx])->header)->bloom_filter), value, blob_sizeof(value));
|
||||
bloom_add(&((((avl_group->sub_avls)[avl_group->current_avl_idx])->header)->bloom_filter), value, obi_blob_sizeof(value));
|
||||
index_in_avl = (int32_t) obi_avl_add((avl_group->sub_avls)[avl_group->current_avl_idx], value);
|
||||
|
||||
// Build the index containing the AVL index
|
||||
|
Reference in New Issue
Block a user