Obiblob_indexer API
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
#include "obitypes.h"
|
||||
#include "obierrno.h"
|
||||
#include "obidebug.h"
|
||||
#include "obiavl.h"
|
||||
#include "obiblob_indexer.h"
|
||||
|
||||
|
||||
#define DEBUG_LEVEL 0 // TODO has to be defined somewhere else (cython compil flag?)
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
int obi_column_set_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, char* value)
|
||||
{
|
||||
Obi_blob_p value_b;
|
||||
index_t idx;
|
||||
Obi_blob_p value_b;
|
||||
index_t idx;
|
||||
|
||||
// Check that the line number is not greater than the maximum allowed
|
||||
if (line_nb >= MAXIMUM_LINE_COUNT)
|
||||
@ -60,8 +60,8 @@ int obi_column_set_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb,
|
||||
if (value_b == NULL)
|
||||
return -1;
|
||||
|
||||
// Add in the AVL tree
|
||||
idx = obi_avl_group_add(column->avl, value_b);
|
||||
// Add in the indexer
|
||||
idx = obi_indexer_add(column->indexer, value_b);
|
||||
if (idx == -1)
|
||||
return -1;
|
||||
|
||||
@ -129,7 +129,7 @@ const char* obi_column_get_obistr_with_elt_idx(OBIDMS_column_p column, index_t l
|
||||
if (idx == OBIIdx_NA)
|
||||
return OBIStr_NA;
|
||||
|
||||
value_b = obi_avl_group_get(column->avl, idx);
|
||||
value_b = obi_indexer_get(column->indexer, idx);
|
||||
|
||||
return obi_blob_to_str(value_b);
|
||||
}
|
||||
|
Reference in New Issue
Block a user