-
Notifications
You must be signed in to change notification settings - Fork 304
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
Support variadic arguments (args: ...
syntax)
#376
Comments
This shouldn't be hard to implement, if you want to give it a shot I'm happy to mentor :) |
How to implement? |
Given this code: #[no_mangle]
pub unsafe extern "C" fn func(fixed: u32, mut args: ...) {
let x: u8 = args.arg();
let y: u16 = args.arg();
let z: u32 = args.arg();
println!("{} {} {} {}", fixed, x, y, z);
} Right now cbindgen says:
So basically the code in |
can you fix it? |
I mean, I could, but I have no real incentive to right now and cbindgen is just a free-time kinda thing. So I'd rather let other people help with the project and get introduced to it, specially since this is not particularly super-complicated. |
Why say this? I create a testcase and it's do nothing |
I know nothing about cbindgen, hard for me to fix it |
There are many cases in Relibc where Rust functions are wrapped in C functions only to make them use
...
syntax.Related Rust RFC: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md
The text was updated successfully, but these errors were encountered: