diff options
| author | Fabian Freyer <fabian.freyer@physik.tu-berlin.de> | 2022-01-31 06:24:07 +0100 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-02-14 18:45:09 -0500 |
| commit | 181ad567199e5685578ecf7ad400257098c2e175 (patch) | |
| tree | 9e45c986cc8157dfe0fd6f5a8e80898d4a128309 /rust/src/debuginfo.rs | |
| parent | ae7ae4f63f931342e155d77bb4cf6d75289682bf (diff) | |
rust: add ArrayGuard and for non-owned arrays
To make use of shard functionality, we split the CoreOwnedArrayProvider
into CoreArrayProvider and CoreOwnedArrayProvider. Array makes use of
the CoreOwnedArrayProvider, which depends on CoreArrayProvider, while
the new ArrayGuard only requires CoreArrayProvider and represents
a non-owned array.
Diffstat (limited to 'rust/src/debuginfo.rs')
| -rw-r--r-- | rust/src/debuginfo.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs index b01aca6a..56786d19 100644 --- a/rust/src/debuginfo.rs +++ b/rust/src/debuginfo.rs @@ -226,10 +226,12 @@ impl ToOwned for DebugInfoParser { } } -unsafe impl CoreOwnedArrayProvider for DebugInfoParser { +impl CoreArrayProvider for DebugInfoParser { type Raw = *mut BNDebugInfoParser; type Context = (); +} +unsafe impl CoreOwnedArrayProvider for DebugInfoParser { unsafe fn free(raw: *mut Self::Raw, count: usize, _: &Self::Context) { BNFreeDebugInfoParserList(raw, count); } |
