diff options
| author | Alexander Taylor <alex@vector35.com> | 2025-06-24 14:47:37 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-06-25 18:36:48 -0400 |
| commit | c21c5dbb75780e9d73d5886a50b2a320dc250fcf (patch) | |
| tree | df7b7d7bc8072423701ee602c36aa6b6dc3230d5 /rust/src/architecture.rs | |
| parent | 826372c53c091f3b61c2db52925f5074af86449b (diff) | |
Temporary fix for Rust API.
This...should probably not be done this way. But, at least we don't fail
clippy now.
Diffstat (limited to 'rust/src/architecture.rs')
| -rw-r--r-- | rust/src/architecture.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 054c078b..3344b2af 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -471,14 +471,14 @@ pub trait Architecture: 'static + Sized + AsRef<CoreArchitecture> { il: &LowLevelILMutableFunction, ) -> Option<(usize, bool)>; - fn analyze_basic_blocks( + unsafe fn analyze_basic_blocks( &self, function: &mut Function, context: *mut BNBasicBlockAnalysisContext, ) { unsafe { BNArchitectureDefaultAnalyzeBasicBlocks(function.handle, context); - }; + } } /// Fallback flag value calculation path. This method is invoked when the core is unable to @@ -1544,14 +1544,14 @@ impl Architecture for CoreArchitecture { } } - fn analyze_basic_blocks( + unsafe fn analyze_basic_blocks( &self, function: &mut Function, context: *mut BNBasicBlockAnalysisContext, ) { unsafe { BNArchitectureAnalyzeBasicBlocks(self.handle, function.handle, context); - }; + } } fn flag_write_llil<'a>( @@ -2267,7 +2267,9 @@ where { let custom_arch = unsafe { &*(ctxt as *mut A) }; let mut function = unsafe { Function::from_raw(function) }; - custom_arch.analyze_basic_blocks(&mut function, context); + unsafe { + custom_arch.analyze_basic_blocks(&mut function, context); + } } extern "C" fn cb_reg_name<A>(ctxt: *mut c_void, reg: u32) -> *mut c_char |
