summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2022-03-18 12:35:46 -0400
committerPeter LaFosse <peter@vector35.com>2022-03-23 14:52:09 -0400
commit5646f03f9a61feb24584a8a5da94027783b16e5a (patch)
tree662104a1ddcc47cfd9c6717e90a5f56c137a1f2e /python/types.py
parent33bddd0c8ad5c45a07c56caa964dd42631cd169c (diff)
Fix a bunch of reference miscounts in the C++ and python apis
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/types.py b/python/types.py
index 2201e6a6..69ab0a8d 100644
--- a/python/types.py
+++ b/python/types.py
@@ -1799,10 +1799,14 @@ class Type:
return MutableTypeBuilder(type.mutable_copy(), bv, name, platform, confidence)
def with_replaced_structure(self, from_struct, to_struct):
- return Type.create(handle=core.BNTypeWithReplacedStructure(self._handle, from_struct.handle, to_struct.handle))
+ handle = core.BNTypeWithReplacedStructure(self._handle, from_struct.handle, to_struct.handle)
+ ref_handle = core.BNNewTypeReference(handle)
+ return Type.create(handle=ref_handle)
def with_replaced_enumeration(self, from_enum, to_enum):
- return Type.create(handle=core.BNTypeWithReplacedEnumeration(self._handle, from_enum.handle, to_enum.handle))
+ handle = core.BNTypeWithReplacedEnumeration(self._handle, from_enum.handle, to_enum.handle)
+ ref_handle = core.BNNewTypeReference(handle)
+ return Type.create(handle=ref_handle)
def with_replaced_named_type_reference(self, from_ref, to_ref):
return Type.create(