From c005eb9c223f219fbaf885b01f9d5012ab8cd674 Mon Sep 17 00:00:00 2001 From: Tyler Neely Date: Mon, 2 May 2016 08:56:12 -0700 Subject: [PATCH] Bump libc crate to 0.2.10, fix the improper use of u64 where usize should have been used in some places. --- Cargo.toml | 2 +- src/ffi.rs | 8 ++++---- src/rocksdb_options.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 49fc4f9..625bd9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,4 +24,4 @@ name = "test" path = "test/test.rs" [dependencies] -libc = "0.1.8" +libc = "0.2.10" diff --git a/src/ffi.rs b/src/ffi.rs index c8f5777..741d6d5 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -162,17 +162,17 @@ extern "C" { pub fn rocksdb_options_set_level0_stop_writes_trigger(options: DBOptions, no: c_int); pub fn rocksdb_options_set_write_buffer_size(options: DBOptions, - bytes: u64); + bytes: usize); pub fn rocksdb_options_set_target_file_size_base(options: DBOptions, bytes: u64); pub fn rocksdb_options_set_target_file_size_multiplier(options: DBOptions, mul: c_int); pub fn rocksdb_options_set_max_log_file_size(options: DBOptions, - bytes: u64); + bytes: usize); pub fn rocksdb_options_set_max_manifest_file_size(options: DBOptions, - bytes: u64); + bytes: usize); pub fn rocksdb_options_set_hash_skip_list_rep(options: DBOptions, - bytes: u64, + bytes: usize, a1: i32, a2: i32); pub fn rocksdb_options_set_compaction_style(options: DBOptions, diff --git a/src/rocksdb_options.rs b/src/rocksdb_options.rs index 6a801d3..a3e9469 100644 --- a/src/rocksdb_options.rs +++ b/src/rocksdb_options.rs @@ -69,7 +69,7 @@ impl BlockBasedOptions { BlockBasedOptions { inner: block_opts } } - pub fn set_block_size(&mut self, size: u64) { + pub fn set_block_size(&mut self, size: usize) { unsafe { rocksdb_ffi::rocksdb_block_based_options_set_block_size(self.inner, size);