From 4aeb55836f26dc9614264bb3b3ce48a8ba5122e8 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Thu, 2 Dec 2021 04:20:45 -0500 Subject: Rust API - Add BinaryView::data_variables --- rust/src/types.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'rust/src/types.rs') diff --git a/rust/src/types.rs b/rust/src/types.rs index ec12712b..2567f72d 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -1620,22 +1620,22 @@ impl DataVariable { } } -// unsafe impl CoreOwnedArrayProvider for DataVariable { -// type Raw = BNDataVariable; -// type Context = (); +unsafe impl CoreOwnedArrayProvider for DataVariable { + type Raw = BNDataVariable; + type Context = (); -// unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { -// BNFreeDataVariables(raw, count); -// } -// } + unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { + BNFreeDataVariables(raw, count); + } +} -// unsafe impl<'a> CoreOwnedArrayWrapper<'a> for DataVariable { -// type Wrapped = &'a DataVariable; +unsafe impl<'a> CoreOwnedArrayWrapper<'a> for DataVariable { + type Wrapped = &'a DataVariable; -// unsafe fn wrap_raw(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped { -// mem::transmute(raw) -// } -// } + unsafe fn wrap_raw(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped { + mem::transmute(raw) + } +} ///////////////////////// // DataVariableAndName -- cgit v1.3.1