From 2ae6d71adf22c4f7917e12120c88437a77233d6e Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Aug 2021 18:42:09 -0700 Subject: [PATCH] blittable --- crates/gen/src/parser/method_signature.rs | 2 +- tests/implement/tests/com_chain.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/gen/src/parser/method_signature.rs b/crates/gen/src/parser/method_signature.rs index 43277ba91a..26528bb856 100644 --- a/crates/gen/src/parser/method_signature.rs +++ b/crates/gen/src/parser/method_signature.rs @@ -480,7 +480,7 @@ impl MethodParam { let kind = self.signature.kind.gen_name(gen); if self.param.is_input() { - if self.signature.kind.is_primitive() { + if self.signature.kind.is_blittable() { quote! { #name } } else { quote! { &*(&#name as *const <#kind as ::windows::Abi>::Abi as *const <#kind as ::windows::Abi>::DefaultType) } diff --git a/tests/implement/tests/com_chain.rs b/tests/implement/tests/com_chain.rs index be5703f59b..34a3f9bb10 100644 --- a/tests/implement/tests/com_chain.rs +++ b/tests/implement/tests/com_chain.rs @@ -21,8 +21,7 @@ impl Test { Ok(()) } - // TODO: should be able to declare BOOL without a reference. - fn Save(&self, _: &Option, _: &BOOL) -> Result<()> { + fn Save(&self, _: &Option, _: BOOL) -> Result<()> { Ok(()) }