summaryrefslogtreecommitdiff
path: root/rust/src/debuginfo.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-05-03 13:28:53 -0300
committerKyle Martin <krm504@nyu.edu>2024-05-10 12:00:27 -0400
commitea7a22b16fc56c23af397dd690c6c839dfb3a8f1 (patch)
tree45f3ba19172017694388ab6f7266e23df76bb670 /rust/src/debuginfo.rs
parent015314d34d073a8ebbd958edf8150a81381f12c2 (diff)
hide array implementation details
Diffstat (limited to 'rust/src/debuginfo.rs')
-rw-r--r--rust/src/debuginfo.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs
index 2b3a2cd0..054e15cd 100644
--- a/rust/src/debuginfo.rs
+++ b/rust/src/debuginfo.rs
@@ -273,12 +273,16 @@ impl ToOwned for DebugInfoParser {
impl CoreArrayProvider for DebugInfoParser {
type Raw = *mut BNDebugInfoParser;
type Context = ();
+ type Wrapped<'a> = Guard<'a, DebugInfoParser>;
}
-unsafe impl CoreOwnedArrayProvider for DebugInfoParser {
+unsafe impl CoreArrayProviderInner for DebugInfoParser {
unsafe fn free(raw: *mut Self::Raw, count: usize, _: &Self::Context) {
BNFreeDebugInfoParserList(raw, count);
}
+ unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, context: &'a Self::Context) -> Self::Wrapped<'a> {
+ Guard::new(Self { handle: *raw }, context)
+ }
}
unsafe impl CoreArrayWrapper for DebugInfoParser {