From 897795ec936b2d56b16ceec762f674c20d73dd52 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 9 Jul 2022 19:12:20 -0700 Subject: [PATCH] fix: use thread HANDLE in trace_thread --- src/backtrace/dbghelp.rs | 2 +- src/backtrace/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backtrace/dbghelp.rs b/src/backtrace/dbghelp.rs index 9577be4e7..3c59e33fa 100644 --- a/src/backtrace/dbghelp.rs +++ b/src/backtrace/dbghelp.rs @@ -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(); diff --git a/src/backtrace/mod.rs b/src/backtrace/mod.rs index 83aa00d35..559f2902a 100644 --- a/src/backtrace/mod.rs +++ b/src/backtrace/mod.rs @@ -82,7 +82,7 @@ pub unsafe fn trace_thread_unsynchronized 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`