diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-05-10 11:17:31 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-05-10 11:22:15 -0400 |
| commit | 8873db8d15e85b0e7c9067ac4a750928904d5e21 (patch) | |
| tree | 30c005cc1c11cf8fdf9535c23c6bb7d025703847 /rust/src/callingconvention.rs | |
| parent | 590ff3e4e90a01738929163cc0abf9535b839f2b (diff) | |
Partially revert my previous commit: Allow extra type bounds, but suppress clippy with comment
Diffstat (limited to 'rust/src/callingconvention.rs')
| -rw-r--r-- | rust/src/callingconvention.rs | 18 |
1 files changed, 12 insertions, 6 deletions
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<C>( _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<C>); 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<C>( _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<C>); let val = &mut *val; @@ -391,8 +397,8 @@ where getGlobalPointerRegister: Some(cb_global_pointer_reg::<C>), getImplicitlyDefinedRegisters: Some(cb_implicitly_defined_registers::<C>), - getIncomingRegisterValue: Some(cb_incoming_reg_value), - getIncomingFlagValue: Some(cb_incoming_flag_value), + getIncomingRegisterValue: Some(cb_incoming_reg_value::<C>), + getIncomingFlagValue: Some(cb_incoming_flag_value::<C>), getIncomingVariableForParameterVariable: Some(cb_incoming_var_for_param::<C>), getParameterVariableForIncomingVariable: Some(cb_incoming_param_for_var::<C>), |
