Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty commit for CI check #443

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Fix cfgs"
This reverts commit 8d1467d.
oyvindln committed Jan 25, 2025
commit 51f00a14efc8427587d20496b1791340071241d2
56 changes: 18 additions & 38 deletions src/ffi/c.rs
Original file line number Diff line number Diff line change
@@ -50,38 +50,27 @@ impl Default for StreamWrapper {
reserved: 0,
opaque: ptr::null_mut(),
state: ptr::null_mut(),

#[cfg(any(
// zlib-ng
feature = "zlib-ng",
// libz-sys
all(not(feature = "cloudflare_zlib"), not(feature = "zlib-ng"), not(feature = "zlib-rs"))
#[cfg(all(
feature = "any_zlib",
not(any(feature = "cloudflare-zlib-sys", feature = "libz-rs-sys"))
))]
zalloc: allocator::zalloc,
#[cfg(any(
// zlib-ng
feature = "zlib-ng",
// libz-sys
all(not(feature = "cloudflare_zlib"), not(feature = "zlib-ng"), not(feature = "zlib-rs"))
#[cfg(all(
feature = "any_zlib",
not(any(feature = "cloudflare-zlib-sys", feature = "libz-rs-sys"))
))]
zfree: allocator::zfree,

#[cfg(
// cloudflare-zlib
all(feature = "cloudflare_zlib", not(feature = "zlib-rs"), not(feature = "zlib-ng")),
)]
#[cfg(all(feature = "any_zlib", feature = "cloudflare-zlib-sys"))]
zalloc: Some(allocator::zalloc),
#[cfg(
// cloudflare-zlib
all(feature = "cloudflare_zlib", not(feature = "zlib-rs"), not(feature = "zlib-ng")),
)]
#[cfg(all(feature = "any_zlib", feature = "cloudflare-zlib-sys"))]
zfree: Some(allocator::zfree),

// for zlib-rs, it is most efficient to have it provide the allocator.
// The libz-rs-sys dependency is configured to use the rust system allocator
#[cfg(all(feature = "zlib-rs", not(feature = "zlib-ng")))]
#[cfg(all(feature = "any_zlib", feature = "libz-rs-sys"))]
zalloc: None,
#[cfg(all(feature = "zlib-rs", not(feature = "zlib-ng")))]
#[cfg(all(feature = "any_zlib", feature = "libz-rs-sys"))]
zfree: None,
})),
}
@@ -98,14 +87,7 @@ impl Drop for StreamWrapper {
}
}

#[cfg(any(
// zlib-ng
feature = "zlib-ng",
// cloudflare-zlib
all(feature = "cloudflare_zlib", not(feature = "zlib-rs"), not(feature = "zlib-ng")),
// libz-sys
all(not(feature = "cloudflare_zlib"), not(feature = "zlib-ng"), not(feature = "zlib-rs")),
))]
#[cfg(all(feature = "any_zlib", not(feature = "libz-rs-sys")))]
mod allocator {
use super::*;

@@ -423,19 +405,17 @@ mod c_backend {
#[cfg(feature = "zlib-ng")]
use libz_ng_sys as libz;

#[cfg(all(feature = "zlib-rs", not(feature = "zlib-ng")))]
#[cfg(all(not(feature = "zlib-ng"), feature = "zlib-rs"))]
use libz_rs_sys as libz;

#[cfg(
// cloudflare-zlib
all(feature = "cloudflare_zlib", not(feature = "zlib-rs"), not(feature = "zlib-ng")),
)]
#[cfg(all(not(feature = "zlib-ng"), feature = "cloudflare_zlib"))]
use cloudflare_zlib_sys as libz;

#[cfg(
// libz-sys
all(not(feature = "cloudflare_zlib"), not(feature = "zlib-ng"), not(feature = "zlib-rs")),
)]
#[cfg(all(
not(feature = "cloudflare_zlib"),
not(feature = "zlib-ng"),
not(feature = "zlib-rs")
))]
use libz_sys as libz;

pub use libz::deflate as mz_deflate;