Merge branch 'luke_tests'
This commit is contained in:
14
src/bloom.c
14
src/bloom.c
@@ -26,9 +26,9 @@
|
||||
#define MAKESTRING(n) STRING(n)
|
||||
#define STRING(n) #n
|
||||
|
||||
#ifdef __linux__
|
||||
unsigned detect_bucket_size(unsigned fallback_size);
|
||||
#endif
|
||||
//#ifdef __linux__ // TODO commented because triggers error on luke21
|
||||
//unsigned detect_bucket_size(unsigned fallback_size);
|
||||
//#endif
|
||||
|
||||
|
||||
static int test_bit_set_bit(unsigned char * buf, unsigned int x, int set_bit)
|
||||
@@ -89,11 +89,11 @@ static void setup_buckets(struct bloom * bloom, unsigned int cache_size)
|
||||
// either compute it or use built-in default
|
||||
|
||||
if (cache_size == 0) {
|
||||
#ifdef __linux__
|
||||
cache_size = detect_bucket_size(BLOOM_BUCKET_SIZE_FALLBACK);
|
||||
#else
|
||||
//#ifdef __linux__ // TODO commented because triggers error on luke21
|
||||
// cache_size = detect_bucket_size(BLOOM_BUCKET_SIZE_FALLBACK);
|
||||
//#else
|
||||
cache_size = BLOOM_BUCKET_SIZE_FALLBACK;
|
||||
#endif
|
||||
//#endif
|
||||
}
|
||||
|
||||
bloom->buckets = (bloom->bytes / cache_size);
|
||||
|
@@ -587,16 +587,19 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
}
|
||||
|
||||
// Build the indexer name if needed
|
||||
if (((data_type == OBI_STR) || (data_type == OBI_SEQ)) && (strcmp(indexer_name, "") == 0))
|
||||
if ((data_type == OBI_STR) || (data_type == OBI_SEQ))
|
||||
{
|
||||
final_indexer_name = obi_build_indexer_name(column_name, version_number);
|
||||
if (final_indexer_name == NULL)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
final_indexer_name = (char*) malloc((strlen(indexer_name)+1)*sizeof(char));
|
||||
strcpy(final_indexer_name, indexer_name);
|
||||
if (strcmp(indexer_name, "") == 0)
|
||||
{
|
||||
final_indexer_name = obi_build_indexer_name(column_name, version_number);
|
||||
if (final_indexer_name == NULL)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
final_indexer_name = (char*) malloc((strlen(indexer_name)+1)*sizeof(char));
|
||||
strcpy(final_indexer_name, indexer_name);
|
||||
}
|
||||
}
|
||||
|
||||
returned_data_type = data_type;
|
||||
|
Reference in New Issue
Block a user