Skip to content

Commit

Permalink
Fix for bindgen 0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
gyscos committed Jul 5, 2017
1 parent b277802 commit 8e47cd1
Show file tree
Hide file tree
Showing 7 changed files with 829 additions and 706 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ categories = ["compression", "api-bindings"]
license = "MIT"
name = "zstd"
repository = "https://github.com/gyscos/zstd-rs"
version = "0.4.12"
version = "0.4.13"
exclude = ["assets"]
readme = "Readme.md"

Expand All @@ -16,7 +16,7 @@ travis-ci = { repository = "gyscos/zstd-rs" }

[dependencies]
libc = "0.2"
zstd-safe = { path="zstd-safe", version = "1.3.0", default-features = false }
zstd-safe = { path="zstd-safe", version = "1.3.1", default-features = false }
tokio-io = { version = "0.1", optional = true }
futures = { version = "0.1", optional = true }

Expand Down
4 changes: 2 additions & 2 deletions zstd-safe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Alexandre Bury <[email protected]>"]
name = "zstd-safe"
version = "1.3.0"
version = "1.3.1"
description = "Safe low-level bindings for the zstd compression library."
keywords = ["zstd", "zstandard", "compression"]
categories = ["api-bindings", "compression"]
Expand All @@ -10,7 +10,7 @@ license = "MIT/Apache-2.0"
readme = "Readme.md"

[dependencies]
zstd-sys = { path="zstd-sys", version = "1.3.0", default-features = false }
zstd-sys = { path="zstd-sys", version = "1.3.1", default-features = false }
libc = "0.2.21"

[features]
Expand Down
4 changes: 2 additions & 2 deletions zstd-safe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ pub fn train_from_buffer(dict_buffer: &mut [u8], samples_buffer: &[u8],
samples_sizes.len() as u32)
}
}
pub fn get_block_size_max(cctx: &mut CCtx) -> usize {
unsafe { zstd_sys::ZSTD_getBlockSizeMax(cctx.0) }
pub fn get_block_size(cctx: &mut CCtx) -> usize {
unsafe { zstd_sys::ZSTD_getBlockSize(cctx.0) }
}
pub fn compress_block(cctx: &mut CCtx, dst: &mut [u8], src: &[u8]) -> usize {
unsafe {
Expand Down
4 changes: 2 additions & 2 deletions zstd-safe/zstd-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Alexandre Bury <[email protected]>"]
name = "zstd-sys"
build = "build.rs"
version = "1.3.0"
version = "1.3.1"
description = "Low-level bindings for the zstd compression library."
keywords = ["zstd", "zstandard", "compression"]
categories = ["api-bindings", "compression"]
Expand All @@ -12,7 +12,7 @@ readme = "Readme.md"

[build-dependencies]
bindgen = { version = "0.26", optional = true }
gcc = "0.3.45"
gcc = "0.3.51"
glob = "0.2.11"

[dependencies]
Expand Down
1 change: 0 additions & 1 deletion zstd-safe/zstd-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ fn generate_bindings() {
use std::path::PathBuf;

let bindings = bindgen::Builder::default()
.no_unstable_rust()
.header("zstd.h")
.generate_comments(false) //< remove this when it works
.hide_type("max_align_t")
Expand Down
1,516 changes: 820 additions & 696 deletions zstd-safe/zstd-sys/src/bindings.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion zstd-safe/zstd-sys/zstd.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* This file is used to generate bindings for both headers.
* Just run the following command to generate the bindings:
bindgen zstd.h --ctypes-prefix ::libc --blacklist-type max_align_t --no-unstable-rust --use-core -- -DZSTD_STATIC_LINKING_ONLY > src/bindings.rs
bindgen zstd.h --ctypes-prefix ::libc --blacklist-type max_align_t --use-core -- -DZSTD_STATIC_LINKING_ONLY > src/bindings.rs
Or use the `bindgen` feature, which will create the bindings automatically.
Expand Down

0 comments on commit 8e47cd1

Please sign in to comment.