summaryrefslogtreecommitdiff
path: root/python/flowgraph.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/flowgraph.py')
-rw-r--r--python/flowgraph.py14
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)