From 790c79b1811d1a87e3a86e2ead892dddcc8b6b8f Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Wed, 23 Mar 2022 14:42:27 -0400 Subject: Add BNAddTypeLibraryNamedTypeSource API --- python/typelibrary.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python/typelibrary.py') diff --git a/python/typelibrary.py b/python/typelibrary.py index 2d2c8fb1..0a7bbccc 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -307,6 +307,15 @@ class TypeLibrary: raise ValueError("parameter type must be a Type") core.BNAddTypeLibraryNamedType(self.handle, name._to_core_struct(), type.handle) + def add_type_source(self, name: types.QualifiedName, source: str) -> None: + """ + Manually flag NamedTypeReferences to the given QualifiedName as originating from another source + TypeLibrary with the given dependency name. + + .. warning:: Use this api with extreme caution. + """ + core.BNAddTypeLibraryNamedTypeSource(self.handle, QualifiedName(name)._to_core_struct(), source) + def get_named_object(self, name: str) -> Optional[types.Type]: """ `get_named_object` direct extracts a reference to a contained object -- when -- cgit v1.3.1