Skip to content

Commit af52306

Browse files
committed
Add support for testing v3 in CI
1 parent d84e46e commit af52306

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

libmimalloc-sys/src/extended.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,15 @@ pub const mi_option_max_errors: mi_option_t = 19;
542542
/// Option (experimental)
543543
pub const mi_option_max_warnings: mi_option_t = 20;
544544

545+
#[cfg(not(feature = "v3"))]
545546
/// Option (experimental)
546547
pub const mi_option_max_segment_reclaim: mi_option_t = 21;
547548

548549
/// Last option.
550+
#[cfg(not(feature = "v3"))]
549551
pub const _mi_option_last: mi_option_t = 37;
552+
#[cfg(feature = "v3")]
553+
pub const _mi_option_last: mi_option_t = 43;
550554

551555
extern "C" {
552556
// Note: mi_option_{enable,disable} aren't exposed because they're redundant

libmimalloc-sys/sys-test/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ libc = "0.2"
1313

1414
[build-dependencies]
1515
ctest2 = "0.4"
16+
17+
[features]
18+
v3 = ["libmimalloc-sys/v3"]

libmimalloc-sys/sys-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ fn main() {
1414
"{cargo_manifest_dir}/../c_src/mimalloc/{version}/include"
1515
))
1616
.cfg("feature", Some("extended"))
17+
.cfg("feature", (version == "v3").then(|| "v3"))
1718
.fn_cname(|rust, link_name| link_name.unwrap_or(rust).to_string())
1819
// ignore whether or not the option enum is signed.
1920
.skip_signededness(|c| c.ends_with("_t") || c.ends_with("_e"))

0 commit comments

Comments
 (0)