Skip to content

Commit

Permalink
Simplify implementation signatures for blittable parameters (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Aug 13, 2021
1 parent 700eb26 commit 1dd9a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/gen/src/parser/method_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
3 changes: 1 addition & 2 deletions tests/implement/tests/com_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ impl Test {
Ok(())
}

// TODO: should be able to declare BOOL without a reference.
fn Save(&self, _: &Option<IStream>, _: &BOOL) -> Result<()> {
fn Save(&self, _: &Option<IStream>, _: BOOL) -> Result<()> {
Ok(())
}

Expand Down

0 comments on commit 1dd9a40

Please sign in to comment.