summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-05-20 18:34:53 -0400
committerGlenn Smith <glenn@vector35.com>2025-05-22 15:09:17 -0400
commit5094770405372098081110764843950364933904 (patch)
tree2bfb540eb99a414917cc9565f1562e0c8be58920 /rust/src
parent1b579ce8166b960533e098e37a4f076ca5a8fe02 (diff)
Add TypeContainer::GetEmptyTypeContainer
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/type_container.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/type_container.rs b/rust/src/type_container.rs
index d68fc9c0..e8c915df 100644
--- a/rust/src/type_container.rs
+++ b/rust/src/type_container.rs
@@ -42,6 +42,12 @@ impl TypeContainer {
}
}
+ /// Get an empty type container that contains no types (immutable)
+ pub fn empty() -> TypeContainer {
+ let result = unsafe { BNGetEmptyTypeContainer() };
+ unsafe { Self::from_raw(NonNull::new(result).unwrap()) }
+ }
+
/// Get an id string for the Type Container. This will be unique within a given
/// analysis session, but may not be globally unique.
pub fn id(&self) -> String {