From 5646f03f9a61feb24584a8a5da94027783b16e5a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 18 Mar 2022 12:35:46 -0400 Subject: Fix a bunch of reference miscounts in the C++ and python apis --- python/types.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'python/types.py') 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( -- cgit v1.3.1