diff options
Diffstat (limited to 'rust/src/string.rs')
| -rw-r--r-- | rust/src/string.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/src/string.rs b/rust/src/string.rs index 198c764b..647ef9b0 100644 --- a/rust/src/string.rs +++ b/rust/src/string.rs @@ -155,17 +155,19 @@ impl fmt::Display for BnString { } } -unsafe impl CoreOwnedArrayProvider for BnString { +impl CoreArrayProvider for BnString { type Raw = *mut raw::c_char; type Context = (); +} +unsafe impl CoreOwnedArrayProvider for BnString { unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) { use binaryninjacore_sys::BNFreeStringList; BNFreeStringList(raw, count); } } -unsafe impl<'a> CoreOwnedArrayWrapper<'a> for BnString { +unsafe impl<'a> CoreArrayWrapper<'a> for BnString { type Wrapped = &'a BnStr; unsafe fn wrap_raw(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped { |
