summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorJordan Wiens <github@psifertex.com>2025-10-23 17:17:36 -0400
committerJordan Wiens <github@psifertex.com>2025-10-23 17:17:36 -0400
commit0151725f8b0cf1262fd0242434f029b0040fbe73 (patch)
tree8e9367496fbec6b2194e22586faaea6f52ba6155 /python/types.py
parent9a8faad50f56d748fcd1498c170797c67bb53217 (diff)
allow types.get_types to take str or QualifedName
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/types.py b/python/types.py
index 2f506912..c88360f2 100644
--- a/python/types.py
+++ b/python/types.py
@@ -2135,7 +2135,7 @@ class Type:
return result
def get_lines(
- self, bv: Union['binaryview.BinaryView', 'typecontainer.TypeContainer'], name: str, padding_cols: int = 64, collapsed: bool = False,
+ self, bv: Union['binaryview.BinaryView', 'typecontainer.TypeContainer'], name: Union[str, 'QualifiedName'], padding_cols: int = 64, collapsed: bool = False,
escaping: TokenEscapingType = TokenEscapingType.NoTokenEscapingType
) -> List['TypeDefinitionLine']:
"""
@@ -2158,6 +2158,8 @@ class Type:
container = bv
else:
assert False, "Unexpected type container type"
+ if isinstance(name, QualifiedName):
+ name = str(name)
core_lines = core.BNGetTypeLines(self._handle, container.handle, name, padding_cols, collapsed, escaping, count)
assert core_lines is not None, "core.BNGetTypeLines returned None"
lines = []