summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-04-11 16:24:47 -0400
committerGlenn Smith <glenn@vector35.com>2024-04-11 16:24:47 -0400
commit6661609598076636391651115793864291319845 (patch)
treecff6c1a933b8d3209019e495d3d32e4d9ad87d61 /python
parent3394019790216360933090478665025216727891 (diff)
Change default paddingCols value to 64
80 would have made sense if it were characters, but blocks of 0x50 bytes just look plain weird
Diffstat (limited to 'python')
-rw-r--r--python/typeprinter.py10
-rw-r--r--python/types.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/python/typeprinter.py b/python/typeprinter.py
index 47793ec3..aea598b3 100644
--- a/python/typeprinter.py
+++ b/python/typeprinter.py
@@ -288,7 +288,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
log_error(traceback.format_exc())
return False
- def _default_print_all_types(self, types_: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 80, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
+ def _default_print_all_types(self, types_: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 64, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
cpp_names = (core.BNQualifiedName * len(types_))()
cpp_types = (ctypes.POINTER(core.BNType) * len(types_))()
@@ -379,7 +379,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
raise NotImplementedError()
- def get_type_lines(self, type: types.Type, container: 'typecontainer.TypeContainer', name: types.QualifiedNameType, padding_cols = 80, collapsed = False, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> List[types.TypeDefinitionLine]:
+ def get_type_lines(self, type: types.Type, container: 'typecontainer.TypeContainer', name: types.QualifiedNameType, padding_cols = 64, collapsed = False, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> List[types.TypeDefinitionLine]:
"""
Generate a multi-line representation of a type
@@ -393,7 +393,7 @@ class TypePrinter(metaclass=_TypePrinterMetaclass):
"""
raise NotImplementedError()
- def print_all_types(self, types: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 80, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
+ def print_all_types(self, types: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 64, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
"""
Print all types to a single big string, including headers, sections, etc
@@ -491,7 +491,7 @@ class CoreTypePrinter(TypePrinter):
def get_type_lines(self, type: types.Type, container: 'typecontainer.TypeContainer',
name: types.QualifiedNameType,
- padding_cols = 80, collapsed = False,
+ padding_cols = 64, collapsed = False,
escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType
) -> List[types.TypeDefinitionLine]:
if not isinstance(name, types.QualifiedName):
@@ -507,7 +507,7 @@ class CoreTypePrinter(TypePrinter):
core.BNFreeTypeDefinitionLineList(core_lines, count.value)
return lines
- def print_all_types(self, types_: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 80, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
+ def print_all_types(self, types_: List[Tuple[types.QualifiedNameType, types.Type]], data: binaryview.BinaryView, padding_cols = 64, escaping: TokenEscapingType = TokenEscapingType.BackticksTokenEscapingType) -> str:
cpp_names = (core.BNQualifiedName * len(types_))()
cpp_types = (ctypes.POINTER(core.BNType) * len(types_))()
diff --git a/python/types.py b/python/types.py
index e08bc796..945b88be 100644
--- a/python/types.py
+++ b/python/types.py
@@ -2005,7 +2005,7 @@ class Type:
return result
def get_lines(
- self, bv: Union['binaryview.BinaryView', 'typecontainer.TypeContainer'], name: str, padding_cols: int = 80, collapsed: bool = False,
+ self, bv: Union['binaryview.BinaryView', 'typecontainer.TypeContainer'], name: str, padding_cols: int = 64, collapsed: bool = False,
escaping: TokenEscapingType = TokenEscapingType.NoTokenEscapingType
) -> List['TypeDefinitionLine']:
"""