Skip to content

Commit

Permalink
_Segments etc for compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Sep 18, 2023
1 parent 537e4a5 commit b087870
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bincopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


__author__ = 'Erik Moqvist'
__version__ = '18.0.0'
__version__ = '18.0.1'


DEFAULT_WORD_SIZE_BITS = 8
Expand Down Expand Up @@ -356,6 +356,8 @@ class Chunk(namedtuple("Chunk", ["address", "data"])):
def __len___(self):
return len(self.data)

_Chunk = Chunk

def __init__(self, minimum_address, maximum_address, data, word_size_bytes):
self.minimum_address = minimum_address
self.maximum_address = maximum_address
Expand Down Expand Up @@ -503,6 +505,9 @@ def __repr__(self):
return f'Segment(address={self.address}, data={self.data})'


_Segment = Segment


class Segments:
"""A list of segments.
Expand Down Expand Up @@ -652,6 +657,9 @@ def __len__(self):
return len(self._list)


_Segments = Segments


class BinFile:
"""A binary file.
Expand Down

0 comments on commit b087870

Please sign in to comment.