Make UnwindTraceFn take &UnwindContext only

This commit is contained in:
Gary Guo 2023-08-06 12:50:27 +01:00
parent 2f9e374431
commit f5ef1d145e
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ pub struct UnwindException {
}
pub type UnwindTraceFn =
extern "C" fn(ctx: &mut UnwindContext<'_>, arg: *mut c_void) -> UnwindReasonCode;
extern "C" fn(ctx: &UnwindContext<'_>, arg: *mut c_void) -> UnwindReasonCode;
#[cfg(not(feature = "unwinder"))]
#[repr(C)]

View File

@ -60,7 +60,7 @@ fn stack_trace() {
counter: usize,
}
extern "C" fn callback(
unwind_ctx: &mut UnwindContext<'_>,
unwind_ctx: &UnwindContext<'_>,
arg: *mut c_void,
) -> UnwindReasonCode {
let data = unsafe { &mut *(arg as *mut CallbackData) };

View File

@ -390,7 +390,7 @@ pub extern "C-unwind" fn _Unwind_Backtrace(
let frame = try1!(Frame::from_context(&ctx, signal));
if !skipping {
let code = trace(
&mut UnwindContext {
&UnwindContext {
frame: frame.as_ref(),
ctx: &mut ctx,
signal,