summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2017-05-25 19:51:45 -0400
committerPeter LaFosse <peter@vector35.com>2017-05-25 19:51:52 -0400
commitd7cb0b3acc0621aa69061d0d1199ac33c664e58f (patch)
tree9a0cda4bd39ca7ba7d88821ba7d2ee17db47c41d /python/types.py
parent18c3e2e49ceef496d272f6bcbf81b0d768f29acb (diff)
Modify how structures are created in the type system, expose additional structure APIs
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/types.py b/python/types.py
index 1e566f68..f8e416f4 100644
--- a/python/types.py
+++ b/python/types.py
@@ -22,7 +22,7 @@ import ctypes
# Binary Ninja components
import _binaryninjacore as core
-from enums import SymbolType, TypeClass, NamedTypeReferenceClass, InstructionTextTokenType
+from enums import SymbolType, TypeClass, NamedTypeReferenceClass, InstructionTextTokenType, StructureType
import callingconvention
import function
@@ -646,9 +646,13 @@ class Structure(object):
def union(self):
return core.BNIsStructureUnion(self.handle)
- @union.setter
- def union(self, value):
- core.BNSetStructureUnion(self.handle, value)
+ @property
+ def type(self):
+ return StructureType(core.BNGetStructureType(self.handle))
+
+ @type.setter
+ def type(self, value):
+ core.BNSetStructureType(self.handle, value)
def __setattr__(self, name, value):
try: