Skip to content

Commit 30e7d0c

Browse files
committed
[Python] Add missing TypeLibrary.duplicate API
1 parent 2b948ac commit 30e7d0c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

plugins/bntl_utils/src/tbd.rs

Whitespace-only changes.

python/typelibrary.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ def name(self, value:str):
139139
"""Sets the name of a type library instance that has not been finalized"""
140140
core.BNSetTypeLibraryName(self.handle, value)
141141

142+
def duplicate(self) -> 'TypeLibrary':
143+
"""
144+
Creates a new type library instance with a random GUID and the same data as the current instance.
145+
146+
:rtype: TypeLibrary
147+
"""
148+
return TypeLibrary(core.BNDuplicateTypeLibrary(self.handle))
149+
142150
@property
143151
def dependency_name(self) -> Optional[str]:
144152
"""

0 commit comments

Comments
 (0)