Skip to content

Bindings for types mentioned in whitelisted function's signature are not generated #291

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

Closed
fitzgen opened this issue Nov 21, 2016 · 1 comment

Comments

@fitzgen
Copy link
Member

fitzgen commented Nov 21, 2016

The transitive nature of whitelisting means that bindings for these types should be generated.

Testcase incoming...

@fitzgen
Copy link
Member Author

fitzgen commented Nov 21, 2016

$ ./target/debug/bindgen ./linux_bindings.h --whitelist-function dl_iterate_phdr

Input:

struct dl_phdr_info {
    int x;
};

int dl_iterate_phdr(struct dl_phdr_info *);

Output:

/* automatically generated by rust-bindgen */

extern "C" {
    pub fn dl_iterate_phdr(arg1: *mut dl_phdr_info) -> ::std::os::raw::c_int;
}

Note the lack of a definition for dl_phdr_info, despite it being in the signature of the whitelisted dl_iterate_phdr function.

fitzgen added a commit to fitzgen/rust-bindgen that referenced this issue Nov 21, 2016
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.

Fixes rust-lang#291
fitzgen added a commit to fitzgen/rust-bindgen that referenced this issue Nov 21, 2016
This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.

Fixes rust-lang#291
bors-servo pushed a commit that referenced this issue Nov 21, 2016
… r=emilio

Trace function signature types

This extends the `TypeCollector` trait implementation for `Item` to
consider items of kind `Function` and to collect the types found in the
function's signature.

Fixes #291

r? @emilio
luser pushed a commit to luser/rust-bindgen that referenced this issue Mar 27, 2017
Add a Clippy build to Travis
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

1 participant