diff options
| author | Brian Potchik <brian@vector35.com> | 2024-05-27 15:29:48 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2024-05-27 15:29:48 -0400 |
| commit | a348dab8b14b8ddd36c400ae39a7a48b6a28e829 (patch) | |
| tree | c5aa3b6274b57660d263de44ac1eccc9bfa8739d /rust/src/lib.rs | |
| parent | 309d606f1c51168c0ef30ccf7850d483429fa35b (diff) | |
Update load APIs to take a JSON string for options.
Diffstat (limited to 'rust/src/lib.rs')
| -rw-r--r-- | rust/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs index d2894b20..de38be4d 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -197,14 +197,13 @@ const BN_INVALID_EXPR: usize = usize::MAX; /// The main way to open and load files into Binary Ninja. Make sure you've properly initialized the core before calling this function. See [`crate::headless::init()`] pub fn load<S: BnStrCompatible>(filename: S) -> Option<rc::Ref<binaryview::BinaryView>> { let filename = filename.into_bytes_with_nul(); - let metadata = Metadata::new_of_type(MetadataType::KeyValueDataType); let handle = unsafe { binaryninjacore_sys::BNLoadFilename( filename.as_ref().as_ptr() as *mut _, true, + std::ptr::null(), None, - metadata.handle, ) }; @@ -245,8 +244,8 @@ pub fn load_with_options<S: BnStrCompatible>( binaryninjacore_sys::BNLoadFilename( filename.as_ref().as_ptr() as *mut _, update_analysis_and_wait, + options_or_default.get_json_string().unwrap().as_ref().as_ptr() as *mut _, None, - options_or_default.as_ref().handle, ) }; |
