Renamed "Obi_byte_arrays" to "Obiblobs" and moved Obiblob functions to

separate obiblob.c and obiblob.h files
This commit is contained in:
Celine Mercier
2016-04-12 11:21:14 +02:00
parent c225cfd8b6
commit 375bfcce8a
8 changed files with 304 additions and 249 deletions

View File

@ -32,7 +32,7 @@
int obi_column_set_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, char* value)
{
Obi_byte_array_p value_b;
Obi_blob_p value_b;
index_t idx;
// Check that the line number is not greater than the maximum allowed
@ -56,7 +56,7 @@ int obi_column_set_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb,
(column->header)->lines_used = line_nb+1;
// Encode the value on a byte array with a header
value_b = obi_str_to_obibytes(value);
value_b = obi_str_to_blob(value);
if (value_b == NULL)
return -1;
@ -84,7 +84,7 @@ int obi_column_set_obistr_with_elt_idx_in_view(Obiview_p view, OBIDMS_column_p c
return -1;
}
if ((view->line_selection != NULL) || (!(column->writable)))
if ((view->line_selection != NULL) || (!(column->writable))) // TODO why check here writable?
{
// Get the right line number
if (column->writable)
@ -114,7 +114,7 @@ int obi_column_set_obistr_with_elt_idx_in_view(Obiview_p view, OBIDMS_column_p c
const char* obi_column_get_obistr_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx)
{
index_t idx;
Obi_byte_array_p value_b;
Obi_blob_p value_b;
if ((line_nb+1) > ((column->header)->line_count))
{
@ -131,7 +131,7 @@ const char* obi_column_get_obistr_with_elt_idx(OBIDMS_column_p column, index_t l
value_b = obi_avl_group_get(column->avl, idx);
return obi_obibytes_to_str(value_b);
return obi_blob_to_str(value_b);
}