diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2019-05-15 15:17:57 -0700 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2019-05-15 15:17:57 -0700 |
| commit | 13a793f7ad19f43ff97c058becb76182b0159452 (patch) | |
| tree | e677419e13f654f337002d5950193a9abbf90a99 /python/flowgraph.py | |
| parent | 392672b07f971cebe3da5de20a24fd8d425c1061 (diff) | |
first half of the refactor adding getters and setters for init created properties
Diffstat (limited to 'python/flowgraph.py')
| -rw-r--r-- | python/flowgraph.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/python/flowgraph.py b/python/flowgraph.py index 189b075c..a5ac686c 100644 --- a/python/flowgraph.py +++ b/python/flowgraph.py @@ -58,9 +58,10 @@ class FlowGraphNode(object): raise ValueError("flow graph node must be associated with a graph") handle = core.BNCreateFlowGraphNode(graph.handle) self.handle = handle + self._graph = graph self.graph = graph - if self.graph is None: - self.graph = FlowGraph(handle = core.BNGetFlowGraphNodeOwner(self.handle)) + if self._graph is None: + self._graph = FlowGraph(handle = core.BNGetFlowGraphNodeOwner(self.handle)) def __del__(self): if self.handle is not None: @@ -77,6 +78,15 @@ class FlowGraphNode(object): return ctypes.addressof(self.handle.contents) != ctypes.addressof(value.handle.contents) @property + def graph(self): + """ """ + return self._graph + + @graph.setter + def graph(self, value): + self._graph = value + + @property def basic_block(self): """Basic block associated with this part of the flow graph""" block = core.BNGetFlowGraphBasicBlock(self.handle) |
