summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 90432af6..320382de 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -510,6 +510,14 @@ impl Function {
unsafe { Array::new(lines, count, ()) }
}
+ pub fn block_sort_hint(&self, addr: u64, arch: Option<CoreArchitecture>) -> Option<i64> {
+ let arch = arch.unwrap_or_else(|| self.arch());
+ let mut result = 0;
+ unsafe {
+ BNGetFunctionBlockSortHint(self.handle, arch.handle, addr, &mut result).then_some(result)
+ }
+ }
+
pub fn variable_name(&self, var: &Variable) -> String {
unsafe {
let raw_var = BNVariable::from(var);