From 4c278a57b59c4b8e913d17b47bc4828659b32659 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Tue, 12 May 2026 21:19:28 -0400 Subject: Changes related to display as/type toggling. --- python/types.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index b47d98ce..80c70e14 100644 --- a/python/types.py +++ b/python/types.py @@ -32,7 +32,7 @@ from .enums import ( TypeReferenceType, MemberAccess, MemberScope, TypeDefinitionLineType, TokenEscapingType, NameType, PointerSuffix, PointerBaseType, - Endianness + Endianness, IntegerDisplayType ) from . import callingconvention from . import function as _function @@ -903,6 +903,15 @@ class TypeBuilder: _value = BoolWithConfidence.get_core_struct(value) core.BNTypeBuilderSetSigned(self._handle, _value) + @property + def display_type(self) -> IntegerDisplayType: + """Integer display type for this type.""" + return core.BNGetIntegerTypeDisplayType(self.immutable_copy().handle) + + @display_type.setter + def display_type(self, value: IntegerDisplayType) -> None: + core.BNSetIntegerTypeDisplayType(self._handle, value) + @property def children(self) -> List['TypeBuilder']: return [] @@ -2145,6 +2154,11 @@ class Type: core.BNFreeTypeAttributeList(attributes, count.value) return result + @property + def display_type(self) -> IntegerDisplayType: + """Integer display type for this type.""" + return core.BNGetIntegerTypeDisplayType(self._handle) + def _to_core_struct(self) -> core.BNTypeWithConfidence: type_conf = core.BNTypeWithConfidence() type_conf.type = self._handle -- cgit v1.3.1