From e34e52c2f797c9b97b592abb311e3a5bc2194b4a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 5 Apr 2019 21:55:47 -0400 Subject: Add API for geting a list of type names without the associated objects --- python/binaryview.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 373823c8..c92a9120 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1196,6 +1196,17 @@ class BinaryView(object): core.BNFreeTypeList(type_list, count.value) return result + @property + def type_names(self): + """List of defined type names (read-only)""" + count = ctypes.c_ulonglong(0) + name_list = core.BNGetAnalysisTypeNames(self.handle, count, "") + result = [] + for i in range(0, count.value): + result.append(types.QualifiedName._from_core_struct(name_list[i])) + core.BNFreeTypeNameList(name_list, count.value) + return result + @property def segments(self): """List of segments (read-only)""" -- cgit v1.3.1