Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parse extra bindings to builder #644

Closed
Kaiser1989 opened this issue Jan 8, 2021 · 1 comment
Closed

Add parse extra bindings to builder #644

Kaiser1989 opened this issue Jan 8, 2021 · 1 comment

Comments

@Kaiser1989
Copy link

Kaiser1989 commented Jan 8, 2021

Parse -> extra_bindings is available under cbindgen.toml, but missing in the Builder.

I added a pull request:

#[allow(unused)]
pub fn with_parse_extra_bindings<S: AsRef<str>>(mut self, extra_bindings: &[S]) -> Builder {
    self.config.parse.extra_bindings = extra_bindings
        .iter()
        .map(|x| String::from(x.as_ref()))
        .collect();
    self
}
@emilio
Copy link
Collaborator

emilio commented Jan 14, 2021

Fixed by #645. Thanks!

@emilio emilio closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants