From 13a793f7ad19f43ff97c058becb76182b0159452 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 15 May 2019 15:17:57 -0700 Subject: first half of the refactor adding getters and setters for init created properties --- python/flowgraph.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'python/flowgraph.py') 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: @@ -76,6 +77,15 @@ class FlowGraphNode(object): return True 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""" -- cgit v1.3.1