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

void typedef with new type alias generates invalid binding #2964

Open
nyurik opened this issue Oct 29, 2024 · 0 comments
Open

void typedef with new type alias generates invalid binding #2964

nyurik opened this issue Oct 29, 2024 · 0 comments

Comments

@nyurik
Copy link
Contributor

nyurik commented Oct 29, 2024

My code needs to generate new type aliases for a large native library. I can easily do it by prefix, e.g. "VCL_.*", but some matching typedefs break because neither Copy nor Clone are implemented for c_void.

// bindgen-flags: --new-type-alias "MY_VOID"
typedef void MY_VOID;
// Generated code
#[repr(transparent)]
#[derive(Debug, Copy, Clone)]        // <--- ERROR - c_void does not implement Copy or Clone
pub struct MY_VOID(pub ::std::os::raw::c_void);
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