From 23f619a047ff754eafb84a6ec5f666bbe9e47711 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Sun, 3 May 2026 02:30:34 -0400 Subject: Sort switch blocks in graph view by case number --- rust/src/function.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rust/src/function.rs') 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) -> Option { + 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); -- cgit v1.3.1