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

Remove win32metadata workaround #2021

Merged
merged 1 commit into from Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 4 additions & 9 deletions crates/libs/bindgen/src/structs.rs
Expand Up @@ -16,15 +16,10 @@ fn gen_struct_with_name(gen: &Gen, def: TypeDef, struct_name: &str, cfg: &Cfg) -
let name = to_ident(struct_name);

if gen.reader.type_def_fields(def).next().is_none() {
if name.as_str().ends_with("Vtbl") {
// This just omits some useless struct declarations like `IDDVideoPortContainerVtbl`
return quote! {};
} else {
return quote! {
#[repr(C)]
pub struct #name(pub u8);
};
}
return quote! {
#[repr(C)]
pub struct #name(pub u8);
};
}

let flags = gen.reader.type_def_flags(def);
Expand Down