@@ -266,6 +266,9 @@ struct crocksdb_sst_file_meta_data_t {
266
266
struct crocksdb_compaction_options_t {
267
267
CompactionOptions rep;
268
268
};
269
+ struct crocksdb_compaction_reason_t {
270
+ CompactionReason rep;
271
+ };
269
272
270
273
struct crocksdb_map_property_t {
271
274
std::map<std::string, std::string> rep;
@@ -746,7 +749,7 @@ crocksdb_t* crocksdb_open_column_families_with_ttl(
746
749
const char ** column_family_names,
747
750
const crocksdb_options_t ** column_family_options,
748
751
const int32_t * ttl_array,
749
- bool read_only,
752
+ unsigned char read_only,
750
753
crocksdb_column_family_handle_t ** column_family_handles,
751
754
char ** errptr) {
752
755
std::vector<ColumnFamilyDescriptor> column_families;
@@ -1139,7 +1142,7 @@ void crocksdb_destroy_map_property(crocksdb_map_property_t* info) {
1139
1142
delete info;
1140
1143
}
1141
1144
1142
- bool crocksdb_get_map_property_cf (
1145
+ unsigned char crocksdb_get_map_property_cf (
1143
1146
crocksdb_t * db,
1144
1147
crocksdb_column_family_handle_t * column_family,
1145
1148
const char * property,
@@ -1916,11 +1919,11 @@ const crocksdb_table_properties_t* crocksdb_flushjobinfo_table_properties(
1916
1919
&info->rep .table_properties );
1917
1920
}
1918
1921
1919
- bool crocksdb_flushjobinfo_triggered_writes_slowdown (const crocksdb_flushjobinfo_t * info) {
1922
+ unsigned char crocksdb_flushjobinfo_triggered_writes_slowdown (const crocksdb_flushjobinfo_t * info) {
1920
1923
return info->rep .triggered_writes_slowdown ;
1921
1924
}
1922
1925
1923
- bool crocksdb_flushjobinfo_triggered_writes_stop (const crocksdb_flushjobinfo_t * info) {
1926
+ unsigned char crocksdb_flushjobinfo_triggered_writes_stop (const crocksdb_flushjobinfo_t * info) {
1924
1927
return info->rep .triggered_writes_stop ;
1925
1928
}
1926
1929
@@ -2003,9 +2006,9 @@ uint64_t crocksdb_compactionjobinfo_total_output_bytes(
2003
2006
return info->rep .stats .total_output_bytes ;
2004
2007
}
2005
2008
2006
- CompactionReason crocksdb_compactionjobinfo_compaction_reason (
2009
+ const crocksdb_compaction_reason_t * crocksdb_compactionjobinfo_compaction_reason (
2007
2010
const crocksdb_compactionjobinfo_t * info) {
2008
- return info->rep .compaction_reason ;
2011
+ return reinterpret_cast < const crocksdb_compaction_reason_t *>(& info->rep .compaction_reason ) ;
2009
2012
}
2010
2013
2011
2014
/* ExternalFileIngestionInfo */
@@ -2895,11 +2898,11 @@ void crocksdb_options_set_vector_memtable_factory(crocksdb_options_t* opt, uint6
2895
2898
opt->rep .memtable_factory .reset (new VectorRepFactory (reserved_bytes));
2896
2899
}
2897
2900
2898
- bool crocksdb_load_latest_options (const char * dbpath, crocksdb_env_t * env,
2901
+ unsigned char crocksdb_load_latest_options (const char * dbpath, crocksdb_env_t * env,
2899
2902
crocksdb_options_t * db_options,
2900
2903
crocksdb_column_family_descriptor*** cf_descs,
2901
2904
size_t * cf_descs_len,
2902
- bool ignore_unknown_options, char ** errptr) {
2905
+ unsigned char ignore_unknown_options, char ** errptr) {
2903
2906
std::vector<ColumnFamilyDescriptor> tmp_cf_descs;
2904
2907
Status s = rocksdb::LoadLatestOptions (dbpath, env->rep , &db_options->rep ,
2905
2908
&tmp_cf_descs, ignore_unknown_options);
@@ -2934,7 +2937,7 @@ crocksdb_ratelimiter_t* crocksdb_ratelimiter_create_with_auto_tuned(
2934
2937
int64_t refill_period_us,
2935
2938
int32_t fairness,
2936
2939
crocksdb_ratelimiter_mode_t mode,
2937
- bool auto_tuned) {
2940
+ unsigned char auto_tuned) {
2938
2941
crocksdb_ratelimiter_t * rate_limiter = new crocksdb_ratelimiter_t ;
2939
2942
RateLimiter::Mode m = RateLimiter::Mode::kWritesOnly ;
2940
2943
switch (mode) {
@@ -3437,7 +3440,7 @@ void crocksdb_lru_cache_options_set_num_shard_bits(
3437
3440
}
3438
3441
3439
3442
void crocksdb_lru_cache_options_set_strict_capacity_limit (
3440
- crocksdb_lru_cache_options_t * opt, bool strict_capacity_limit) {
3443
+ crocksdb_lru_cache_options_t * opt, unsigned char strict_capacity_limit) {
3441
3444
opt->rep .strict_capacity_limit = strict_capacity_limit;
3442
3445
}
3443
3446
@@ -3785,7 +3788,7 @@ void crocksdb_ingest_external_file_cf(
3785
3788
SaveError (errptr, db->rep ->IngestExternalFile (handle->rep , files, opt->rep ));
3786
3789
}
3787
3790
3788
- bool crocksdb_ingest_external_file_optimized (
3791
+ unsigned char crocksdb_ingest_external_file_optimized (
3789
3792
crocksdb_t * db, crocksdb_column_family_handle_t * handle,
3790
3793
const char * const * file_list, const size_t list_len,
3791
3794
const crocksdb_ingestexternalfileoptions_t * opt, char ** errptr) {
@@ -3947,7 +3950,7 @@ void crocksdb_fifo_compaction_options_set_max_table_files_size(
3947
3950
}
3948
3951
3949
3952
void crocksdb_fifo_compaction_options_set_allow_compaction (
3950
- crocksdb_fifo_compaction_options_t * fifo_opts, bool allow_compaction) {
3953
+ crocksdb_fifo_compaction_options_t * fifo_opts, unsigned char allow_compaction) {
3951
3954
fifo_opts->rep .allow_compaction = allow_compaction;
3952
3955
}
3953
3956
@@ -4026,7 +4029,7 @@ void crocksdb_delete_files_in_range(
4026
4029
crocksdb_t * db,
4027
4030
const char * start_key, size_t start_key_len,
4028
4031
const char * limit_key, size_t limit_key_len,
4029
- bool include_end, char ** errptr) {
4032
+ unsigned char include_end, char ** errptr) {
4030
4033
Slice a, b;
4031
4034
SaveError (
4032
4035
errptr,
@@ -4041,7 +4044,7 @@ void crocksdb_delete_files_in_range_cf(
4041
4044
crocksdb_t * db, crocksdb_column_family_handle_t * column_family,
4042
4045
const char * start_key, size_t start_key_len,
4043
4046
const char * limit_key, size_t limit_key_len,
4044
- bool include_end, char ** errptr) {
4047
+ unsigned char include_end, char ** errptr) {
4045
4048
Slice a, b;
4046
4049
SaveError (
4047
4050
errptr,
@@ -4056,7 +4059,7 @@ void crocksdb_delete_files_in_ranges_cf(
4056
4059
crocksdb_t * db, crocksdb_column_family_handle_t * cf,
4057
4060
const char * const * start_keys, const size_t * start_keys_lens,
4058
4061
const char * const * limit_keys, const size_t * limit_keys_lens,
4059
- size_t num_ranges, bool include_end, char ** errptr) {
4062
+ size_t num_ranges, unsigned char include_end, char ** errptr) {
4060
4063
std::vector<Slice> starts (num_ranges);
4061
4064
std::vector<Slice> limits (num_ranges);
4062
4065
std::vector<RangePtr> ranges (num_ranges);
@@ -5246,12 +5249,12 @@ void ctitandb_decode_blob_index(const char* value, size_t value_size,
5246
5249
index->blob_size = bi.blob_handle .size ;
5247
5250
}
5248
5251
5249
- void ctitandb_encode_blob_index (const ctitandb_blob_index_t & index,
5252
+ void ctitandb_encode_blob_index (const ctitandb_blob_index_t * index,
5250
5253
char ** value, size_t * value_size) {
5251
5254
BlobIndex bi;
5252
- bi.file_number = index. file_number ;
5253
- bi.blob_handle .offset = index. blob_offset ;
5254
- bi.blob_handle .size = index. blob_size ;
5255
+ bi.file_number = index-> file_number ;
5256
+ bi.blob_handle .offset = index-> blob_offset ;
5257
+ bi.blob_handle .size = index-> blob_size ;
5255
5258
std::string result;
5256
5259
bi.EncodeTo (&result);
5257
5260
*value = CopyString (result);
@@ -5372,12 +5375,12 @@ void ctitandb_readoptions_destroy(ctitandb_readoptions_t* opts) {
5372
5375
delete opts;
5373
5376
}
5374
5377
5375
- bool ctitandb_readoptions_key_only (ctitandb_readoptions_t * opts) {
5378
+ unsigned char ctitandb_readoptions_key_only (ctitandb_readoptions_t * opts) {
5376
5379
return opts->rep .key_only ;
5377
5380
}
5378
5381
5379
5382
void ctitandb_readoptions_set_key_only (ctitandb_readoptions_t * opts,
5380
- bool v) {
5383
+ unsigned char v) {
5381
5384
opts->rep .key_only = v;
5382
5385
}
5383
5386
@@ -5449,7 +5452,7 @@ void ctitandb_delete_files_in_range(
5449
5452
crocksdb_t * db,
5450
5453
const char * start_key, size_t start_key_len,
5451
5454
const char * limit_key, size_t limit_key_len,
5452
- bool include_end, char ** errptr) {
5455
+ unsigned char include_end, char ** errptr) {
5453
5456
Slice a, b;
5454
5457
RangePtr range (
5455
5458
start_key ? (a = Slice (start_key, start_key_len), &a) : nullptr ,
@@ -5467,7 +5470,7 @@ void ctitandb_delete_files_in_range_cf(
5467
5470
crocksdb_t * db, crocksdb_column_family_handle_t * column_family,
5468
5471
const char * start_key, size_t start_key_len,
5469
5472
const char * limit_key, size_t limit_key_len,
5470
- bool include_end, char ** errptr) {
5473
+ unsigned char include_end, char ** errptr) {
5471
5474
Slice a, b;
5472
5475
RangePtr range (
5473
5476
start_key ? (a = Slice (start_key, start_key_len), &a) : nullptr ,
@@ -5485,7 +5488,7 @@ void ctitandb_delete_files_in_ranges_cf(
5485
5488
crocksdb_t * db, crocksdb_column_family_handle_t * cf,
5486
5489
const char * const * start_keys, const size_t * start_keys_lens,
5487
5490
const char * const * limit_keys, const size_t * limit_keys_lens,
5488
- size_t num_ranges, bool include_end, char ** errptr) {
5491
+ size_t num_ranges, unsigned char include_end, char ** errptr) {
5489
5492
std::vector<Slice> starts (num_ranges);
5490
5493
std::vector<Slice> limits (num_ranges);
5491
5494
std::vector<RangePtr> ranges (num_ranges);
0 commit comments