File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -542,11 +542,15 @@ pub const mi_option_max_errors: mi_option_t = 19;
542542/// Option (experimental)
543543pub const mi_option_max_warnings: mi_option_t = 20 ;
544544
545+ #[ cfg( not( feature = "v3" ) ) ]
545546/// Option (experimental)
546547pub const mi_option_max_segment_reclaim: mi_option_t = 21 ;
547548
548549/// Last option.
550+ #[ cfg( not( feature = "v3" ) ) ]
549551pub const _mi_option_last: mi_option_t = 37 ;
552+ #[ cfg( feature = "v3" ) ]
553+ pub const _mi_option_last: mi_option_t = 43 ;
550554
551555extern "C" {
552556 // Note: mi_option_{enable,disable} aren't exposed because they're redundant
Original file line number Diff line number Diff line change @@ -13,3 +13,6 @@ libc = "0.2"
1313
1414[build-dependencies ]
1515ctest2 = " 0.4"
16+
17+ [features ]
18+ v3 = [" libmimalloc-sys/v3" ]
Original file line number Diff line number Diff 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" ) )
You can’t perform that action at this time.
0 commit comments