Emilio Cobos Álvarez

Results 777 comments of Emilio Cobos Álvarez

Strings are implicitly null-terminated in C/C++, so you don't need the `"test\0"` there, just `"test"` would do in that case. But I think you really need a `const uint8_t NAME[]...

This seems generally reasonable though I'm not sure I've grasped all the details of what you want. Declaring types as opaque should "just work" if you don't make them repr(C)...

> The issue I'm having with them is that while I don't need access from C to their internals, I need them to be complete. [...] Making that backendtype_t repr(C)...

Would be great to get a test for this, and it seems it needs formatting tho. Can you get to it? Otherwise I can try to do it when I...

I got side-tracked with the "avoid extra work when measuring". Merged it in https://github.com/eqrion/cbindgen/commit/5fd38d541712928b7bf212da4f174f00acdceee9 :)

I guess you can use `with_config`, but we should add a `with_macro_expansion` function to `src/bindgen/builder.rs` to make it more convenient.

@lzybkr Feel free to send a patch with an option to specify the concrete calling convention, that seems like a reasonable use-case.

This shouldn't be hard to implement, if you want to give it a shot I'm happy to mentor :)

Given this code: ```rust #[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 =...