summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py
index 1c1d979e..9febfa32 100644
--- a/python/types.py
+++ b/python/types.py
@@ -2457,6 +2457,13 @@ class PointerType(Type):
return cls(core.BNNewTypeReference(core_type), platform, confidence)
@property
+ def origin(self) -> Optional[Tuple['NamedTypeReferenceType', int]]:
+ ntr_handle = core.BNGetTypeNamedTypeReference(self._handle)
+ if ntr_handle is None:
+ return None
+ return (NamedTypeReferenceType(self._handle, self.platform, self.confidence, ntr_handle), self.offset)
+
+ @property
def target(self) -> Type:
"""Target (read-only)"""
result = core.BNGetChildType(self._handle)