We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using bindgen version 0.40
typedef void (__stdcall *void_fn)(); typedef void_fn (__stdcall *fn)(int id);
let builder = bindgen::builder() .header_contents( "header.h", r#" typedef void (__stdcall *void_fn)(); typedef void_fn (__stdcall *fn)(int id); "# ).clang_arg("-target") .clang_arg("i686-pc-windows-msvc") .prepend_enum_name(false) .layout_tests(false) .constified_enum(".*"); let code = builder .generate() .map_err(|_| io::Error::new(io::ErrorKind::Other, "generate() failed"))? .to_string(); println!("{}", code);
/* automatically generated by rust-bindgen */ pub type void_fn = ::std::option::Option<unsafe extern "stdcall" fn()>; pub type fn_ = ::std::option::Option< unsafe extern "stdcall" fn( id: ::std::os::raw::c_int ) -> ::std::option::Option< unsafe extern "stdcall" fn(id: ::std::os::raw::c_int, ...), >, >;
pub type void_fn = ::std::option::Option<unsafe extern "stdcall" fn()>; pub type fn_ = ::std::option::Option< unsafe extern "stdcall" fn( id: ::std::os::raw::c_int ) -> void_fn, >;
I expect the return type of fn_ to have no arguments.
fn_
The text was updated successfully, but these errors were encountered:
Huh, this is a fun one, thanks!
Sorry, something went wrong.
A better fix for the calling convention madness.
685b4f7
Fixes rust-lang#1402.
This is the hack added in #549 biting us back. #1403 should have a better fix.
c75b62d
emilio
No branches or pull requests
I'm using bindgen version 0.40
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
I expect the return type of
fn_
to have no arguments.The text was updated successfully, but these errors were encountered: