From 8873db8d15e85b0e7c9067ac4a750928904d5e21 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 10 May 2023 11:17:31 -0400 Subject: Partially revert my previous commit: Allow extra type bounds, but suppress clippy with comment --- rust/src/callingconvention.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'rust/src/callingconvention.rs') diff --git a/rust/src/callingconvention.rs b/rust/src/callingconvention.rs index aa6b71ad..86abbd6c 100644 --- a/rust/src/callingconvention.rs +++ b/rust/src/callingconvention.rs @@ -286,12 +286,15 @@ where }) } - extern "C" fn cb_incoming_reg_value( + #[allow(clippy::extra_unused_type_parameters)] // TODO : This is bad; need to finish this stub + extern "C" fn cb_incoming_reg_value( _ctxt: *mut c_void, _reg: u32, _func: *mut BNFunction, val: *mut BNRegisterValue, - ) { + ) where + C: CallingConventionBase, + { ffi_wrap!("CallingConvention::incoming_reg_value", unsafe { //let ctxt = &*(ctxt as *mut CustomCallingConventionContext); let val = &mut *val; @@ -301,12 +304,15 @@ where }) } - extern "C" fn cb_incoming_flag_value( + #[allow(clippy::extra_unused_type_parameters)] // TODO : This is bad; need to finish this stub + extern "C" fn cb_incoming_flag_value( _ctxt: *mut c_void, _flag: u32, _func: *mut BNFunction, val: *mut BNRegisterValue, - ) { + ) where + C: CallingConventionBase, + { ffi_wrap!("CallingConvention::incoming_flag_value", unsafe { //let ctxt = &*(ctxt as *mut CustomCallingConventionContext); let val = &mut *val; @@ -391,8 +397,8 @@ where getGlobalPointerRegister: Some(cb_global_pointer_reg::), getImplicitlyDefinedRegisters: Some(cb_implicitly_defined_registers::), - getIncomingRegisterValue: Some(cb_incoming_reg_value), - getIncomingFlagValue: Some(cb_incoming_flag_value), + getIncomingRegisterValue: Some(cb_incoming_reg_value::), + getIncomingFlagValue: Some(cb_incoming_flag_value::), getIncomingVariableForParameterVariable: Some(cb_incoming_var_for_param::), getParameterVariableForIncomingVariable: Some(cb_incoming_param_for_var::), -- cgit v1.3.1