Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 9, 2024
1 parent c13a24b commit 4ae3c68
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions crates/tests/bindgen/src/class_with_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl DeferralCompletedHandler {
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(Box::new(com)) }
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke(&self) -> windows_core::Result<()> {
let this = self;
Expand Down Expand Up @@ -143,7 +143,7 @@ impl<F: FnMut() -> windows_core::Result<()> + Send + 'static> DeferralCompletedH
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = Box::from_raw(this);
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/bindgen/src/delegate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl DeferralCompletedHandler {
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(Box::new(com)) }
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke(&self) -> windows_core::Result<()> {
let this = self;
Expand Down Expand Up @@ -84,7 +84,7 @@ impl<F: FnMut() -> windows_core::Result<()> + Send + 'static> DeferralCompletedH
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = Box::from_raw(this);
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/bindgen/src/delegate_generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<T: windows_core::RuntimeType + 'static> EventHandler<T> {
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(Box::new(com)) }
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
where
Expand Down Expand Up @@ -137,7 +137,7 @@ impl<
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = Box::from_raw(this);
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/misc/component/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Callback {
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(Box::new(com)) }
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke(&self, a: i32) -> windows_core::Result<i32> {
let this = self;
Expand Down Expand Up @@ -93,7 +93,7 @@ impl<F: FnMut(i32) -> windows_core::Result<i32> + Send + 'static> CallbackBox<F>
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = Box::from_raw(this);
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/misc/component_client/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Callback {
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(Box::new(com)) }
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke(&self, a: i32) -> windows_core::Result<i32> {
let this = self;
Expand Down Expand Up @@ -93,7 +93,7 @@ impl<F: FnMut(i32) -> windows_core::Result<i32> + Send + 'static> CallbackBox<F>
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = Box::from_raw(this);
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
Expand Down

0 comments on commit 4ae3c68

Please sign in to comment.