diff options
| author | KyleMiles <krm504@nyu.edu> | 2021-12-02 04:20:45 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2021-12-02 04:25:39 -0500 |
| commit | 4aeb55836f26dc9614264bb3b3ce48a8ba5122e8 (patch) | |
| tree | 296cc04b8fd86d4c78db8c38719812fbe6e43659 /rust/src/types.rs | |
| parent | bbf4d616ebdec77538832c1353b8e200a1ad9bbf (diff) | |
Rust API - Add BinaryView::data_variables
Diffstat (limited to 'rust/src/types.rs')
| -rw-r--r-- | rust/src/types.rs | 26 |
1 files changed, 13 insertions, 13 deletions
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 |
