Take compression level_values as const pointer (#9376)
Summary: Compatible change, more natural (especially in generated Rust bindings), no risk that the API will ever need mutable access because it has to make a copy anyway. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9376 Reviewed By: ajkr Differential Revision: D33541435 Pulled By: pdillinger fbshipit-source-id: 15c512a0d70b6e8694fa99d598b7d022751c1e59
This commit is contained in:
parent
9c6fb26033
commit
f8bdd5797f
2
db/c.cc
2
db/c.cc
@ -2834,7 +2834,7 @@ int rocksdb_options_get_bottommost_compression(rocksdb_options_t* opt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rocksdb_options_set_compression_per_level(rocksdb_options_t* opt,
|
void rocksdb_options_set_compression_per_level(rocksdb_options_t* opt,
|
||||||
int* level_values,
|
const int* level_values,
|
||||||
size_t num_levels) {
|
size_t num_levels) {
|
||||||
opt->rep.compression_per_level.resize(num_levels);
|
opt->rep.compression_per_level.resize(num_levels);
|
||||||
for (size_t i = 0; i < num_levels; ++i) {
|
for (size_t i = 0; i < num_levels; ++i) {
|
||||||
|
@ -950,7 +950,7 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_merge_operator(
|
|||||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_uint64add_merge_operator(
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_uint64add_merge_operator(
|
||||||
rocksdb_options_t*);
|
rocksdb_options_t*);
|
||||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_compression_per_level(
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_compression_per_level(
|
||||||
rocksdb_options_t* opt, int* level_values, size_t num_levels);
|
rocksdb_options_t* opt, const int* level_values, size_t num_levels);
|
||||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_create_if_missing(
|
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_create_if_missing(
|
||||||
rocksdb_options_t*, unsigned char);
|
rocksdb_options_t*, unsigned char);
|
||||||
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_create_if_missing(
|
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_create_if_missing(
|
||||||
|
Loading…
Reference in New Issue
Block a user