diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-09-30 16:59:45 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-30 16:59:45 -0400 |
| commit | ac418b75ea4c6af71a419f9e5b8a05dc36427542 (patch) | |
| tree | ab4e67350462456a669b438274d88efd93f80146 /python/platform.py | |
| parent | e645d7b8bbbfc71d6ed5cd85ce90e2f0ff41fb5b (diff) | |
Fix type errors in Platform and prevent creation of Platform without name
Diffstat (limited to 'python/platform.py')
| -rw-r--r-- | python/platform.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/python/platform.py b/python/platform.py index 610e800a..0d06e362 100644 --- a/python/platform.py +++ b/python/platform.py @@ -20,7 +20,7 @@ import os import ctypes -from typing import Mapping +from typing import Mapping, Optional, List # Binary Ninja components import binaryninja @@ -56,7 +56,7 @@ class Platform(metaclass=_PlatformMetaClass): ``class Platform`` contains all information related to the execution environment of the binary, mainly the calling conventions used. """ - name = None # type: ignore + name = None type_file_path = None # path to platform types file type_include_dirs = [] # list of directories available to #include from type_file_path @@ -81,10 +81,6 @@ class Platform(metaclass=_PlatformMetaClass): self.handle = _handle self._arch = _arch - @property - def name(self) -> str: - return core.BNGetPlatformName(self.handle) - def __del__(self): if core is not None: core.BNFreePlatform(self.handle) |
