diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-06-23 20:20:50 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-05 10:09:09 -0400 |
| commit | bc5c0977dc5b4087e8f39cc67089bb5709aac04e (patch) | |
| tree | 2e955215d9a9000a84412f814d011248f6bdbe5d /python/function.py | |
| parent | 421b398453d09e06e7b202229e34b66414683a45 (diff) | |
type hints for highlevelil.py, mediumlevelil.py and lowlevelil.py, workflow.py
Fix linter error in scriptingprovider.py
Update workflow.py using updated paradigms and type hints
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py index 36ecc52f..3aba76f2 100644 --- a/python/function.py +++ b/python/function.py @@ -253,7 +253,8 @@ class Function: def __init__(self, view:Optional['binaryview.BinaryView']=None, handle:Optional[core.BNFunction]=None): self._advanced_analysis_requests = 0 assert handle is not None, "creation of standalone 'Function' objects is not implemented" - self.handle = core.handle_of_type(handle, core.BNFunction) + FunctionHandle = ctypes.POINTER(core.BNFunction) + self.handle = ctypes.cast(handle, FunctionHandle) if view is None: self._view = binaryview.BinaryView(handle = core.BNGetFunctionData(self.handle)) else: @@ -930,7 +931,7 @@ class Function: @property def session_data(self) -> Any: """Dictionary object where plugins can store arbitrary data associated with the function""" - handle = ctypes.cast(self.handle, ctypes.c_void_p) + handle = ctypes.cast(self.handle, ctypes.c_void_p) # type: ignore if handle.value not in Function._associated_data: obj = _FunctionAssociatedDataStore() Function._associated_data[handle.value] = obj |
