diff options
| author | Glenn Smith <glenn@vector35.com> | 2026-05-03 02:30:34 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2026-05-20 17:10:35 -0400 |
| commit | 23f619a047ff754eafb84a6ec5f666bbe9e47711 (patch) | |
| tree | 9d128bc11c50c2a2bb9fbaa5ce291062afa9b979 /python/function.py | |
| parent | 06611c17ae5ee5936889ff029cac042fdba8a0c5 (diff) | |
Sort switch blocks in graph view by case number
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index 9f5e89bb..8c9eaf1d 100644 --- a/python/function.py +++ b/python/function.py @@ -2437,6 +2437,14 @@ class Function: finally: core.BNFreeInstructionTextLines(lines, count.value) + def get_block_sort_hint(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> Optional[int]: + if arch is None: + arch = self.arch + result = ctypes.c_int64() + if not core.BNGetFunctionBlockSortHint(self.handle, arch.handle, addr, ctypes.byref(result)): + return None + return result.value + def set_auto_type(self, value: StringOrType) -> None: if isinstance(value, str): (value, _) = self.view.parse_type_string(value) |
