From 3c7a00172b3b86add668257ca35b873fc85a7017 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Sat, 8 Jun 2019 23:46:19 -0400 Subject: final refactor for missing parameters --- python/platform.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'python/platform.py') diff --git a/python/platform.py b/python/platform.py index 0ac8858b..0b628225 100644 --- a/python/platform.py +++ b/python/platform.py @@ -105,12 +105,12 @@ class Platform(with_metaclass(_PlatformMetaClass, object)): if arch is None: self.handle = None raise ValueError("platform must have an associated architecture") - self.arch = arch + self._arch = arch self.handle = core.BNCreatePlatform(arch.handle, self.__class__.name) else: self.handle = handle self.__dict__["name"] = core.BNGetPlatformName(self.handle) - self.arch = binaryninja.architecture.CoreArchitecture._from_cache(core.BNGetPlatformArchitecture(self.handle)) + self._arch = binaryninja.architecture.CoreArchitecture._from_cache(core.BNGetPlatformArchitecture(self.handle)) def __del__(self): if self.handle is not None: @@ -464,3 +464,12 @@ class Platform(with_metaclass(_PlatformMetaClass, object)): functions[name] = types.Type(core.BNNewTypeReference(parse.functions[i].type), platform = self) core.BNFreeTypeParserResult(parse) return types.TypeParserResult(type_dict, variables, functions) + + @property + def arch(self): + """ """ + return self._arch + + @arch.setter + def arch(self, value): + self._arch = value -- cgit v1.3.1