Expose set_checksum function to C api (#10537)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/10537

Reviewed By: hx235

Differential Revision: D38797662

Pulled By: ajkr

fbshipit-source-id: a8db723c3eb9d5592cd78f8be7e442e4826686ad
main
EdvardD 2 years ago committed by Facebook GitHub Bot
parent 06f73d2575
commit 6e93d24935
  1. 5
      db/c.cc
  2. 2
      include/rocksdb/c.h

@ -2606,6 +2606,11 @@ void rocksdb_block_based_options_destroy(
delete options;
}
void rocksdb_block_based_options_set_checksum(
rocksdb_block_based_table_options_t* opt, char v) {
opt->rep.checksum = static_cast<ROCKSDB_NAMESPACE::ChecksumType>(v);
}
void rocksdb_block_based_options_set_block_size(
rocksdb_block_based_table_options_t* options, size_t block_size) {
options->rep.block_size = block_size;

@ -977,6 +977,8 @@ extern ROCKSDB_LIBRARY_API rocksdb_block_based_table_options_t*
rocksdb_block_based_options_create(void);
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_destroy(
rocksdb_block_based_table_options_t* options);
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_checksum(
rocksdb_block_based_table_options_t*, char);
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_block_size(
rocksdb_block_based_table_options_t* options, size_t block_size);
extern ROCKSDB_LIBRARY_API void

Loading…
Cancel
Save