Skip to content

Commit

Permalink
no-value-type-transmute
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 10, 2024
1 parent 2291719 commit ffe7644
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/libs/bindgen/src/types/cpp_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,11 @@ impl CppMethod {
quote! { #name.into(), }
}
ParamHint::ValueType => {
quote! { core::mem::transmute(#name), }
if flags.contains(ParamAttributes::Out) {
quote! { core::mem::transmute(#name), }
} else {
quote! { #name, }
}
}
ParamHint::Blittable => {
if matches!(ty, Type::PrimitiveOrEnum(_, _)) {
Expand Down

0 comments on commit ffe7644

Please sign in to comment.