summaryrefslogtreecommitdiff
path: root/rust/src/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/types.rs')
-rw-r--r--rust/src/types.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 9b2271d5..8fab75dc 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -1339,6 +1339,24 @@ impl ToOwned for Type {
}
}
+pub struct ComponentReferencedTypes;
+impl CoreArrayProvider for ComponentReferencedTypes{
+ type Raw= *mut BNType;
+ type Context= ();
+ type Wrapped<'a> = &'a Self;
+}
+
+unsafe impl CoreArrayProviderInner for ComponentReferencedTypes{
+ unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) {
+ BNComponentFreeReferencedTypes(raw, count)
+ }
+
+ unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
+ // SAFETY: BNType and Type are trasparent
+ core::mem::transmute(raw)
+ }
+}
+
///////////////////////
// FunctionParameter