Obiblob_indexer API

This commit is contained in:
Celine Mercier
2016-04-12 14:53:33 +02:00
parent cd4e65e190
commit d8107533d8
21 changed files with 252 additions and 131 deletions

View File

@ -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?)
@ -61,8 +61,8 @@ int obi_column_set_obiseq_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;
@ -130,7 +130,7 @@ const char* obi_column_get_obiseq_with_elt_idx(OBIDMS_column_p column, index_t l
if (idx == OBIIdx_NA)
return OBISeq_NA;
value_b = obi_avl_group_get(column->avl, idx);
value_b = obi_indexer_get(column->indexer, idx);
return obi_blob_to_seq(value_b);
}