summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
authormartin <martincharles07@gmail.com>2024-02-06 13:47:04 -0600
committerKyle Martin <krm504@nyu.edu>2024-02-07 13:09:53 -0500
commitcdf9092d03a9870ecf8418d77dd7ec0e17357a26 (patch)
treef5ae95a8e784e95893756fa978f0246e0804c79c /rust/src/function.rs
parent75ee61e20cea015448771efe816b841bb2147f34 (diff)
add function set_can_return_auto and set_can_return_user
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 7f9ad862..e3b586ae 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -179,6 +179,16 @@ impl Function {
}
}
+ pub fn set_can_return_auto(&self, can_return: Conf<bool>) {
+ let mut raw = BNBoolWithConfidence::from(can_return);
+ unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) }
+ }
+
+ pub fn set_can_return_user(&self, can_return: Conf<bool>) {
+ let mut raw = BNBoolWithConfidence::from(can_return);
+ unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) }
+ }
+
pub fn comment_at(&self, addr: u64) -> BnString {
unsafe { BnString::from_raw(BNGetCommentForAddress(self.handle, addr)) }
}