summaryrefslogtreecommitdiff
path: root/python/typecontainer.py
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 /python/typecontainer.py
parent1b579ce8166b960533e098e37a4f076ca5a8fe02 (diff)
Add TypeContainer::GetEmptyTypeContainer
Diffstat (limited to 'python/typecontainer.py')
-rw-r--r--python/typecontainer.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/typecontainer.py b/python/typecontainer.py
index 1a62dbe7..b4a9e794 100644
--- a/python/typecontainer.py
+++ b/python/typecontainer.py
@@ -66,6 +66,16 @@ class TypeContainer:
def __repr__(self):
return f"<type container {self.name}>"
+ @classmethod
+ def empty(cls):
+ """
+ Get an empty Type Container which contains no types (immutable)
+ Useful when a function requires a Type Container but you don't have one.
+ :return: Empty type container
+ """
+ handle = core.BNGetEmptyTypeContainer()
+ return TypeContainer(handle=handle)
+
@property
def id(self) -> str:
"""