diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-09-09 03:29:14 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-09-09 03:29:14 -0400 |
| commit | 6be6ee30e5973fa4d5f29cebdeafdf05c3f4251e (patch) | |
| tree | acffac0a6d81c7037d532d65096a2d04fb45a47e /python/__init__.py | |
| parent | f5e59b13b726a0d154dbe9351010ed3bd4b2b9e6 (diff) | |
Minor changes to API for creation of IL functions
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/python/__init__.py b/python/__init__.py index e36670cc..7978fd2c 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -7201,7 +7201,10 @@ class LowLevelILFunction(object): if handle is not None: self.handle = core.handle_of_type(handle, core.BNLowLevelILFunction) else: - self.handle = core.BNCreateLowLevelILFunction(arch.handle) + func_handle = None + if self.source_function is not None: + func_handle = self.source_function.handle + self.handle = core.BNCreateLowLevelILFunction(arch.handle, func_handle) def __del__(self): core.BNFreeLowLevelILFunction(self.handle) @@ -8164,17 +8167,13 @@ class LowLevelILFunction(object): core.BNLowLevelILSetExprSourceOperand(self.handle, expr.index, n) return expr - def finalize(self, func = None): + def finalize(self): """ - ``finalize`` ends the provided LowLevelILLabel. + ``finalize`` ends the function and computes the list of basic blocks. - :param LowLevelILFunction func: optional function to end :rtype: None """ - if func is None: - core.BNFinalizeLowLevelILFunction(self.handle, None) - else: - core.BNFinalizeLowLevelILFunction(self.handle, func.handle) + core.BNFinalizeLowLevelILFunction(self.handle) def add_label_for_address(self, arch, addr): """ |
