diff options
| author | Rubens Brandao <git@rubens.io> | 2024-05-03 13:28:53 -0300 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-05-10 12:00:27 -0400 |
| commit | ea7a22b16fc56c23af397dd690c6c839dfb3a8f1 (patch) | |
| tree | 45f3ba19172017694388ab6f7266e23df76bb670 /rust/src/callingconvention.rs | |
| parent | 015314d34d073a8ebbd958edf8150a81381f12c2 (diff) | |
hide array implementation details
Diffstat (limited to 'rust/src/callingconvention.rs')
| -rw-r--r-- | rust/src/callingconvention.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rust/src/callingconvention.rs b/rust/src/callingconvention.rs index 723a7cfa..e7888131 100644 --- a/rust/src/callingconvention.rs +++ b/rust/src/callingconvention.rs @@ -26,7 +26,7 @@ use binaryninjacore_sys::*; use crate::architecture::{Architecture, ArchitectureExt, CoreArchitecture, Register}; use crate::rc::{ - CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Guard, Ref, RefCountable, + CoreArrayProvider, CoreArrayProviderInner, Guard, Ref, RefCountable, }; use crate::string::*; @@ -678,17 +678,13 @@ unsafe impl<A: Architecture> RefCountable for CallingConvention<A> { impl<A: Architecture> CoreArrayProvider for CallingConvention<A> { type Raw = *mut BNCallingConvention; type Context = A::Handle; + type Wrapped<'a> = Guard<'a, CallingConvention<A>>; } -unsafe impl<A: Architecture> CoreOwnedArrayProvider for CallingConvention<A> { +unsafe impl<A: Architecture> CoreArrayProviderInner for CallingConvention<A> { unsafe fn free(raw: *mut *mut BNCallingConvention, count: usize, _content: &Self::Context) { BNFreeCallingConventionList(raw, count); } -} - -unsafe impl<A: Architecture> CoreArrayWrapper for CallingConvention<A> { - type Wrapped<'a> = Guard<'a, CallingConvention<A>>; - unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> { Guard::new( CallingConvention { |
