Skip to content

Commit b50d724

Browse files
committed
Stabilize --wrap-static-fns
1 parent fd37d68 commit b50d724

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

bindgen-cli/options.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ struct BindgenCommand {
476476
#[arg(long, value_name = "CUSTOM", value_parser = parse_custom_attribute)]
477477
with_attribute_custom_union: Vec<(Vec<String>, String)>,
478478
/// Generate wrappers for `static` and `static inline` functions.
479-
#[arg(long, requires = "experimental")]
479+
#[arg(long)]
480480
wrap_static_fns: bool,
481481
/// Sets the PATH for the source file that must be created due to the presence of `static` and
482482
/// `static inline` functions.
483-
#[arg(long, requires = "experimental", value_name = "PATH")]
483+
#[arg(long, value_name = "PATH")]
484484
wrap_static_fns_path: Option<PathBuf>,
485485
/// Sets the SUFFIX added to the extern wrapper functions generated for `static` and `static
486486
/// inline` functions.
487-
#[arg(long, requires = "experimental", value_name = "SUFFIX")]
487+
#[arg(long, value_name = "SUFFIX")]
488488
wrap_static_fns_suffix: Option<String>,
489489
/// Set the default VISIBILITY of fields, including bitfields and accessor methods for
490490
/// bitfields. This flag is ignored if the `--respect-cxx-access-specs` flag is used.

bindgen-tests/tests/headers/wrap-static-fns.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --experimental --wrap-static-fns
1+
// bindgen-flags: --wrap-static-fns
22
// bindgen-parse-callbacks: wrap-as-variadic-fn
33

44
// to avoid polluting the expectation tests we put the stdarg.h behind a conditional

bindgen/options/mod.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -1419,10 +1419,8 @@ options! {
14191419
/// Note that they will usually not work. However you can use `-fkeep-inline-functions`
14201420
/// or `-fno-inline-functions` if you are responsible of compiling the library to make
14211421
/// them callable.
1422-
#[cfg_attr(
1423-
feature = "experimental",
1424-
doc = "\nCheck the [`Builder::wrap_static_fns`] method for an alternative."
1425-
)]
1422+
///
1423+
/// Check the [`Builder::wrap_static_fns`] method for an alternative.
14261424
pub fn generate_inline_functions(mut self, doit: bool) -> Self {
14271425
self.options.generate_inline_functions = doit;
14281426
self
@@ -2021,7 +2019,6 @@ options! {
20212019
/// Whether to generate wrappers for `static` functions.
20222020
wrap_static_fns: bool {
20232021
methods: {
2024-
#[cfg(feature = "experimental")]
20252022
/// Set whether to generate wrappers for `static`` functions.
20262023
///
20272024
/// Passing `true` to this method will generate a C source file with non-`static`
@@ -2040,7 +2037,6 @@ options! {
20402037
/// The suffix to be added to the function wrappers for `static` functions.
20412038
wrap_static_fns_suffix: Option<String> {
20422039
methods: {
2043-
#[cfg(feature = "experimental")]
20442040
/// Set the suffix added to the wrappers for `static` functions.
20452041
///
20462042
/// This option only comes into effect if `true` is passed to the
@@ -2057,7 +2053,6 @@ options! {
20572053
/// The path of the file where the wrappers for `static` functions will be emitted.
20582054
wrap_static_fns_path: Option<PathBuf> {
20592055
methods: {
2060-
#[cfg(feature = "experimental")]
20612056
/// Set the path for the source code file that would be created if any wrapper
20622057
/// functions must be generated due to the presence of `static` functions.
20632058
///

0 commit comments

Comments
 (0)