Skip to content

Commit

Permalink
keep TList _options as python bytes and update serialization to…
Browse files Browse the repository at this point in the history
… use the new `bytestring` helper
  • Loading branch information
lobis committed Oct 25, 2022
1 parent 0621c67 commit 8e6ad2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/uproot/models/TList.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _serialize(self, out, header, name, tobject_flags):

for datum, option in zip(self._data, self._options):
uproot.serialization._serialize_object_any(out, datum, None)
out.append(uproot.serialization.string(option))
out.append(uproot.serialization.bytestring(option))

if header:
num_bytes = sum(len(x) for x in out[where:])
Expand Down
2 changes: 1 addition & 1 deletion src/uproot/writing/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def to_TList(data, name=""):
tlist._members["fName"] = name
tlist._data = list(data)
tlist._members["fSize"] = len(tlist._data)
tlist._options = [""] * len(tlist._data)
tlist._options = [b""] * len(tlist._data)

if all(x._deeply_writable for x in tlist._data):
tlist._deeply_writable = True
Expand Down

0 comments on commit 8e6ad2e

Please sign in to comment.