diff --git a/rust/src/function.rs b/rust/src/function.rs index c506a07ae..454d50aa0 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -764,6 +764,40 @@ impl Function { } } + pub fn set_user_parameter_variables(&self, values: I, confidence: u8) + where + I: IntoIterator, + { + let mut vars: Box<[BNVariable]> = values.into_iter().map(|var| var.raw()).collect(); + unsafe { + BNSetUserFunctionParameterVariables( + self.handle, + &mut BNParameterVariablesWithConfidence { + vars: vars.as_mut_ptr(), + count: vars.len(), + confidence, + }, + ) + } + } + + pub fn set_auto_parameter_variables(&self, values: I, confidence: u8) + where + I: IntoIterator, + { + let mut vars: Box<[BNVariable]> = values.into_iter().map(|var| var.raw()).collect(); + unsafe { + BNSetAutoFunctionParameterVariables( + self.handle, + &mut BNParameterVariablesWithConfidence { + vars: vars.as_mut_ptr(), + count: vars.len(), + confidence, + }, + ) + } + } + pub fn parameter_at( &self, addr: u64,