mirror of
https://gitee.com/openharmony/third_party_rust_bindgen
synced 2025-03-04 12:47:22 +00:00
Make whitelisted_var consistant with CLI flags
This commit is contained in:
parent
b349cf7ea0
commit
2c86445a61
11
src/lib.rs
11
src/lib.rs
@ -651,11 +651,20 @@ impl Builder {
|
||||
/// Whitelist the given variable so that it (and all types that it
|
||||
/// transitively refers to) appears in the generated bindings. Regular
|
||||
/// expressions are supported.
|
||||
pub fn whitelisted_var<T: AsRef<str>>(mut self, arg: T) -> Builder {
|
||||
pub fn whitelist_var<T: AsRef<str>>(mut self, arg: T) -> Builder {
|
||||
self.options.whitelisted_vars.insert(arg);
|
||||
self
|
||||
}
|
||||
|
||||
/// Whitelist the given variable.
|
||||
///
|
||||
/// Deprecated: use whitelist_var instead.
|
||||
#[deprecated = "use whitelist_var instead"]
|
||||
pub fn whitelisted_var<T: AsRef<str>>(self, arg: T) -> Builder {
|
||||
self.whitelist_var(arg)
|
||||
}
|
||||
|
||||
|
||||
/// Mark the given enum (or set of enums, if using a pattern) as being
|
||||
/// bitfield-like. Regular expressions are supported.
|
||||
///
|
||||
|
@ -485,7 +485,7 @@ where
|
||||
|
||||
if let Some(whitelist) = matches.values_of("whitelist-var") {
|
||||
for regex in whitelist {
|
||||
builder = builder.whitelisted_var(regex);
|
||||
builder = builder.whitelist_var(regex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user