summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/typelibrary.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py
index 14b882ea..71848c23 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -374,6 +374,16 @@ class TypeLibrary:
raise ValueError("type must be a Type")
core.BNAddTypeLibraryNamedObject(self.handle, name._to_core_struct(), type.handle)
+ def remove_named_object(self, name: 'types.QualifiedName') -> None:
+ """
+ `remove_named_object` removes a named object from the type library's object store.
+ This does not remove any types that are referenced by the object, only the object itself.
+
+ :param QualifiedName name:
+ :rtype: None
+ """
+ core.BNRemoveTypeLibraryNamedObject(self.handle, name._to_core_struct())
+
def add_named_type(self, name: 'types.QualifiedNameType', type: 'types.Type') -> None:
"""
`add_named_type` directly inserts a named object into the type library's object store.
@@ -395,6 +405,13 @@ class TypeLibrary:
raise ValueError("parameter type must be a Type")
core.BNAddTypeLibraryNamedType(self.handle, name._to_core_struct(), type.handle)
+ def remove_named_type(self, name: 'types.QualifiedName') -> None:
+ """
+ `remove_named_type` removes a named type from the type library's type store.
+ This does not remove any objects that reference the type, only the type itself.
+ """
+ core.BNRemoveTypeLibraryNamedType(self.handle, name._to_core_struct())
+
def add_type_source(self, name: types.QualifiedName, source: str) -> None:
"""
Manually flag NamedTypeReferences to the given QualifiedName as originating from another source