Skip to content

Commit 4f1003f

Browse files
committed
Rename native_code_generation_path to wrapper_code_generation_path
1 parent 18cd594 commit 4f1003f

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@
194194
`CargoCallbacks` constant was added to mitigate the breaking nature of this
195195
change. This constant has been marked as deprecated and users will have to
196196
use the new `CargoCallbacks::new` method in the future.
197-
- Renamed `--wrap-static-fns-path` argument to `--native-code-generation-path` and the
198-
corresponding `wrap_static_fns_path` builder function to `native_code_generation_path`.
197+
- Renamed `--wrap-static-fns-path` argument to `-wrapper-code-generation-path` and the
198+
corresponding `wrap_static_fns_path` builder function to `wrapper_code_generation_path`.
199199
## Removed
200200
## Fixed
201201
- Allow compiling `bindgen-cli` with a static libclang.

bindgen-cli/options.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@ struct BindgenCommand {
413413
/// Generate wrappers for `static` and `static inline` functions.
414414
#[arg(long, requires = "experimental")]
415415
wrap_static_fns: bool,
416-
/// Sets the path of the file where generated native code will be emitted.
416+
/// Sets the path of the file where generated code for wrapper functions will be emitted.
417417
#[arg(long, requires = "experimental", value_name = "PATH")]
418-
native_code_generation_path: Option<PathBuf>,
418+
wrapper_code_generation_path: Option<PathBuf>,
419419
/// Sets the SUFFIX added to the extern wrapper functions generated for `static` and `static
420420
/// inline` functions.
421421
#[arg(long, requires = "experimental", value_name = "SUFFIX")]
@@ -559,7 +559,7 @@ where
559559
with_derive_custom_enum,
560560
with_derive_custom_union,
561561
wrap_static_fns,
562-
native_code_generation_path,
562+
wrapper_code_generation_path,
563563
wrap_static_fns_suffix,
564564
macro_function,
565565
default_visibility,
@@ -1095,8 +1095,8 @@ where
10951095
builder = builder.wrap_static_fns(true);
10961096
}
10971097

1098-
if let Some(path) = native_code_generation_path {
1099-
builder = builder.native_code_generation_path(path);
1098+
if let Some(path) = wrapper_code_generation_path {
1099+
builder = builder.wrapper_code_generation_path(path);
11001100
}
11011101

11021102
if let Some(suffix) = wrap_static_fns_suffix {

bindgen-integration/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ fn setup_wrap_static_fns_test() {
234234
.parse_callbacks(Box::new(CargoCallbacks))
235235
.parse_callbacks(Box::new(WrappedVaListCallback))
236236
.wrap_static_fns(true)
237-
.native_code_generation_path(
237+
.wrapper_code_generation_path(
238238
out_path.join("wrap_static_fns").display().to_string(),
239239
)
240240
.clang_arg("-DUSE_VA_HEADER")

bindgen-tests/tests/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ fn test_wrap_static_fns() {
656656
let _bindings = Builder::default()
657657
.header("tests/headers/wrap-static-fns.h")
658658
.wrap_static_fns(true)
659-
.native_code_generation_path(generated_path.display().to_string())
659+
.wrapper_code_generation_path(generated_path.display().to_string())
660660
.parse_callbacks(Box::new(parse_callbacks::WrapAsVariadicFn))
661661
.generate()
662662
.expect("Failed to generate bindings");
@@ -704,7 +704,7 @@ fn test_function_macros() {
704704
"CONDITIONAL_COMPLEX",
705705
FunctionType::new::<f32, (bool, u32)>(),
706706
)
707-
.native_code_generation_path(generated_path.display().to_string())
707+
.wrapper_code_generation_path(generated_path.display().to_string())
708708
.generate()
709709
.expect("Failed to generate bindings");
710710

bindgen/codegen/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4800,7 +4800,7 @@ pub(crate) mod utils {
48004800

48014801
let path = context
48024802
.options()
4803-
.native_code_generation_path
4803+
.wrapper_code_generation_path
48044804
.as_ref()
48054805
.map(PathBuf::from)
48064806
.unwrap_or_else(|| {

bindgen/options/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ options! {
19971997
as_args: "--wrap-static-fns-suffix",
19981998
},
19991999
/// The path of the file where generated native code will be emitted.
2000-
native_code_generation_path: Option<PathBuf> {
2000+
wrapper_code_generation_path: Option<PathBuf> {
20012001
methods: {
20022002
#[cfg(feature = "experimental")]
20032003
/// Set the path for the source code file that would be created if any code
@@ -2012,12 +2012,12 @@ options! {
20122012
///
20132013
/// The default path is `temp_dir/bindgen/extern`, where `temp_dir` is the path
20142014
/// returned by [`std::env::temp_dir`] .
2015-
pub fn native_code_generation_path<T: AsRef<Path>>(mut self, path: T) -> Self {
2016-
self.options.native_code_generation_path = Some(path.as_ref().to_owned());
2015+
pub fn wrapper_code_generation_path<T: AsRef<Path>>(mut self, path: T) -> Self {
2016+
self.options.wrapper_code_generation_path = Some(path.as_ref().to_owned());
20172017
self
20182018
}
20192019
},
2020-
as_args: "--native-code-generation-path",
2020+
as_args: "--wrapper-code-generation-path",
20212021
},
20222022
/// A mapping of names to function types of registered functional macros
20232023
/// for which a wrapping function should be generated.

0 commit comments

Comments
 (0)