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
This commit is contained in:
EdvardD 2022-08-23 14:59:27 -07:00 committed by Facebook GitHub Bot
parent 06f73d2575
commit 6e93d24935
2 changed files with 7 additions and 0 deletions

View file

@ -2606,6 +2606,11 @@ void rocksdb_block_based_options_destroy(
delete options; 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( void rocksdb_block_based_options_set_block_size(
rocksdb_block_based_table_options_t* options, size_t block_size) { rocksdb_block_based_table_options_t* options, size_t block_size) {
options->rep.block_size = block_size; options->rep.block_size = block_size;

View file

@ -977,6 +977,8 @@ extern ROCKSDB_LIBRARY_API rocksdb_block_based_table_options_t*
rocksdb_block_based_options_create(void); rocksdb_block_based_options_create(void);
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_destroy( extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_destroy(
rocksdb_block_based_table_options_t* options); 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( extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_block_size(
rocksdb_block_based_table_options_t* options, size_t block_size); rocksdb_block_based_table_options_t* options, size_t block_size);
extern ROCKSDB_LIBRARY_API void extern ROCKSDB_LIBRARY_API void