summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorkat <kat@vector35.com>2023-04-17 10:12:48 -0500
committerkat <kat@vector35.com>2023-04-17 10:12:48 -0500
commit3012de2bbc4d6f4f5631863e22b411c0b38325eb (patch)
treef58a7c07480d071eb11ec087851fdbe66c81ee27 /python/binaryview.py
parentab54857c50d46cd3157a6c8f45a45e4e12712825 (diff)
Add .components convenience API to Functions and DataVariables
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 950b9935..980876b8 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -9272,6 +9272,10 @@ class DataVariable(CoreDataVariable):
def name(self, value: str) -> None:
self.symbol = value
+ @property
+ def components(self) -> List[component.Component]:
+ return self.view.get_data_variable_parent_components(self)
+
class DataVariableAndName(CoreDataVariable):
def __init__(self, addr: int, var_type: '_types.Type', var_name: str, auto_discovered: bool) -> None: