diff options
| author | Peter LaFosse <peter@vector35.com> | 2017-05-25 19:51:45 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2017-05-25 19:51:52 -0400 |
| commit | d7cb0b3acc0621aa69061d0d1199ac33c664e58f (patch) | |
| tree | 9a0cda4bd39ca7ba7d88821ba7d2ee17db47c41d /python | |
| parent | 18c3e2e49ceef496d272f6bcbf81b0d768f29acb (diff) | |
Modify how structures are created in the type system, expose additional structure APIs
Diffstat (limited to 'python')
| -rw-r--r-- | python/types.py | 12 |
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: |
