diff options
Diffstat (limited to 'python/platform.py')
| -rw-r--r-- | python/platform.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/python/platform.py b/python/platform.py index e60f9a8f..2c4a26f6 100644 --- a/python/platform.py +++ b/python/platform.py @@ -30,6 +30,7 @@ from . import typeparser from . import callingconvention from . import typelibrary from . import architecture +from . import typecontainer class _PlatformMetaClass(type): @@ -262,7 +263,7 @@ class Platform(metaclass=_PlatformMetaClass): for i in range(0, count.value): name = types.QualifiedName._from_core_struct(type_list[i].name) result[name] = types.Type.create(core.BNNewTypeReference(type_list[i].type), platform=self) - core.BNFreeTypeList(type_list, count.value) + core.BNFreeTypeAndNameList(type_list, count.value) return result @property @@ -275,7 +276,7 @@ class Platform(metaclass=_PlatformMetaClass): for i in range(0, count.value): name = types.QualifiedName._from_core_struct(type_list[i].name) result[name] = types.Type.create(core.BNNewTypeReference(type_list[i].type), platform=self) - core.BNFreeTypeList(type_list, count.value) + core.BNFreeTypeAndNameList(type_list, count.value) return result @property @@ -288,7 +289,7 @@ class Platform(metaclass=_PlatformMetaClass): for i in range(0, count.value): name = types.QualifiedName._from_core_struct(type_list[i].name) result[name] = types.Type.create(core.BNNewTypeReference(type_list[i].type), platform=self) - core.BNFreeTypeList(type_list, count.value) + core.BNFreeTypeAndNameList(type_list, count.value) return result @property @@ -359,6 +360,10 @@ class Platform(metaclass=_PlatformMetaClass): result = core.BNGetAssociatedPlatformByAddress(self.handle, new_addr) return Platform(handle=result), new_addr.value + @property + def type_container(self) -> 'typecontainer.TypeContainer': + return typecontainer.TypeContainer(core.BNGetPlatformTypeContainer(self.handle)) + def get_type_by_name(self, name): name = types.QualifiedName(name)._to_core_struct() obj = core.BNGetPlatformTypeByName(self.handle, name) |
