diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-12-22 13:46:10 -0700 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-01-04 11:02:14 -0700 |
| commit | 80b07dfa158bb093cc93e602363655b62ae595f8 (patch) | |
| tree | 4e92af37909c07e64f41cbf73b2ea8e68e875ef0 /rust/src/function.rs | |
| parent | 7c98724a614550e37e5a33805e13179c87363b91 (diff) | |
Support function recognizers in Rust architecture plugins
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index 0a01f337..7af9ee02 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -287,6 +287,20 @@ impl Function { Array::new(variables, count, ()) } } + + pub fn apply_imported_types(&self, sym: &Symbol, t: Option<&Type>) { + unsafe { + BNApplyImportedTypes( + self.handle, + sym.handle, + if let Some(t) = t { + t.handle + } else { + core::ptr::null_mut() + }, + ); + } + } } impl fmt::Debug for Function { |
