summaryrefslogtreecommitdiff
path: root/db/c.cc
diff options
context:
space:
mode:
authorcmumford <cmumford@google.com>2017-10-25 16:13:51 -0700
committerVictor Costan <pwnall@chromium.org>2017-11-03 15:04:26 -0700
commit47cb9e2a211e1d7157078ba7bab536beb29e56dc (patch)
treee5f3196b0780b8f11d52bc1363a2a80cae5c97fd /db/c.cc
parentb5d4a22e64c7a6615b412f464026c808b58b1d34 (diff)
downloadleveldb-47cb9e2a211e1d7157078ba7bab536beb29e56dc.tar.gz
Add leveldb_options_set_max_file_size to the C API.
When the max file size option was added in CL 134391640 the C API was not modified to support this. This change was contributed by GitHub user @olt and fixes issue #439. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173466388
Diffstat (limited to 'db/c.cc')
-rw-r--r--db/c.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/c.cc b/db/c.cc
index 08ff0ad..d242385 100644
--- a/db/c.cc
+++ b/db/c.cc
@@ -446,6 +446,10 @@ void leveldb_options_set_block_restart_interval(leveldb_options_t* opt, int n) {
opt->rep.block_restart_interval = n;
}
+void leveldb_options_set_max_file_size(leveldb_options_t* opt, size_t s) {
+ opt->rep.max_file_size = s;
+}
+
void leveldb_options_set_compression(leveldb_options_t* opt, int t) {
opt->rep.compression = static_cast<CompressionType>(t);
}