Skip to content

Commit

Permalink
fix bad fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Nov 1, 2023
1 parent d8f98b9 commit 7ce3ca8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ function parsetobject(io, tkey::TKey, streamer)

@initparse

# the first entry in the streamer is a TOObject
# the first entry in the streamer is a TObject
parsefields!(io, fields, TObject)

# FIXME: this is just a hack, for TObject-derivatives which are subclassing map<string,string>
Expand Down
4 changes: 2 additions & 2 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ end
"""
function skiptobj(io)
Skips a TOObject.
Skips a TObject.
"""
function skiptobj(io)
version = readtype(io, Int16)
Expand All @@ -130,7 +130,7 @@ end
"""
function endcheck(io, preamble::Preamble)
Checks if everything went well after parsing a TOObject. Used in conjunction
Checks if everything went well after parsing a TObject. Used in conjunction
with `Preamble`.
"""
function endcheck(io, preamble::T) where {T<:Preamble}
Expand Down
6 changes: 3 additions & 3 deletions src/root.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,20 +485,20 @@ end
# read all bytes of DATA and OFFSET from a branch
function readbranchraw(f::ROOTFile, branch)
nbytes = branch.fBasketBytes
data = sizehint!(Vector{UInt8}(), sum(nbytes)) # maximum length if all data are UInt8
res = sizehint!(Vector{UInt8}(), sum(nbytes)) # maximum length if all data are UInt8
offsets = sizehint!(zeros(Int32, 1), branch.fEntries+1) # this is always Int32
position = 0
for (seek, nb) in zip(branch.fBasketSeek, nbytes)
seek==0 && break
data, offset = readbasketseek(f, branch, seek, nb)
append!(data, data)
append!(res, data)
# FIXME: assuming offset has always 0 or at least 2 elements ;)
append!(offsets, (@view offset[2:end]) .+ position)
if length(offset) > 0
position = offsets[end]
end
end
data, offsets
res, offsets
end

# Thanks Jim and Philippe
Expand Down

0 comments on commit 7ce3ca8

Please sign in to comment.