diff options
| author | Ryan Snyder <ryan@vector35.com> | 2024-05-01 08:58:39 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2024-05-01 08:58:39 -0400 |
| commit | 6b268f83d6b496b2314501d5e3d03c03857573b1 (patch) | |
| tree | abd56bb55c0516abb0770c6b50bb43c1eb3d0258 /rust/src/binaryview.rs | |
| parent | e0fb8752878a5edecf5d2d768d4f9571ca9e74d7 (diff) | |
| parent | 562fbfae8aa17a2f3758710b23ec25e828d16cd6 (diff) | |
Merge branch 'name-and-type-transparent' of github.com:rbran/binaryninja-api into dev
Diffstat (limited to 'rust/src/binaryview.rs')
| -rw-r--r-- | rust/src/binaryview.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index 52d688b8..33fd9881 100644 --- a/rust/src/binaryview.rs +++ b/rust/src/binaryview.rs @@ -574,16 +574,24 @@ pub trait BinaryViewExt: BinaryViewBase { } } - fn define_auto_data_var(&self, dv: DataVariable) { + fn define_auto_data_var(&self, dv: &DataVariable) { unsafe { - BNDefineDataVariable(self.as_ref().handle, dv.address, &mut dv.t.into()); + BNDefineDataVariable( + self.as_ref().handle, + dv.address(), + &mut dv.type_with_confidence().into(), + ); } } /// You likely would also like to call [`Self::define_user_symbol`] to bind this data variable with a name - fn define_user_data_var(&self, dv: DataVariable) { + fn define_user_data_var(&self, dv: &DataVariable) { unsafe { - BNDefineUserDataVariable(self.as_ref().handle, dv.address, &mut dv.t.into()); + BNDefineUserDataVariable( + self.as_ref().handle, + dv.address(), + &mut dv.type_with_confidence().into(), + ); } } |
