Skip to content

Commit

Permalink
fix: use thread HANDLE in trace_thread
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 10, 2022
1 parent c5163cd commit 897795e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backtrace/dbghelp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
}

#[inline(always)]
pub unsafe fn trace_thread(cb: &mut dyn FnMut(&super::Frame) -> bool, thread: *mut c_void) {
pub unsafe fn trace_thread(cb: &mut dyn FnMut(&super::Frame) -> bool, thread: HANDLE) {
// Allocate necessary structures for doing the stack walk
let process = GetCurrentProcess();

Expand Down
2 changes: 1 addition & 1 deletion src/backtrace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub unsafe fn trace_thread_unsynchronized<F: FnMut(&Frame) -> bool>(
thread: *mut c_void,
mut cb: F,
) {
trace_thread_imp(&mut cb, thread)
trace_thread_imp(&mut cb, thread as super::windows::HANDLE);
}

/// A trait representing one frame of a backtrace, yielded to the `trace`
Expand Down

0 comments on commit 897795e

Please sign in to comment.